:root {
    --bg-black: #000000;
    --bg-dark-gray: #0a0a0a;
    --card-bg: #111111;
    --highlight: #fcc200;
    --highlight-glow: rgba(252, 194, 0, 0.4);
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --text-mid: #cccccc;
    --error: #ff4d4d;
    --success: #2ecc71;
    --font-inter: 'Inter', sans-serif;
    --font-mont: 'Montserrat', sans-serif;
    --primary-gradient: linear-gradient(135deg, #1a1a1a 0%, #111111 100%);
    --sec-gradient: linear-gradient(135deg, #fcc200 0%, #ffca28 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-inter);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    justify-content: center;
}

.portal-container {
    width: min(100%, 1100px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

main#portal-dashboard {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
.portal-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.brand-logo {
    display: block;
    height: 64px;
    width: auto;
    margin: 0 auto 28px;
}

@media (max-width: 768px) {
    .brand-logo {
        height: 52px;
    }

    .portal-header {
        padding: 36px 16px 24px;
    }

    .portal-header h1 {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .subtitle {
        font-size: 15px;
    }

    .search-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .search-box {
        flex-direction: column;
        gap: 12px;
    }

    .search-box button {
        width: 100%;
        padding: 18px 16px;
        font-size: 15px;
        border-radius: 12px;
        min-height: 56px;
    }

    .search-section {
        padding: 24px 16px;
    }

    .action-row {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    .action-row button {
        width: 100%;
        max-width: 100%;
    }
}

.h1-accent {
    color: var(--highlight);
    display: inline-block;
}

.portal-header h1 {
    font-family: var(--font-mont);
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-gray);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.search-card {
    background: var(--primary-gradient);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.search-card h2 {
    font-family: var(--font-mont);
    font-size: 24px;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.search-box {
    display: flex;
    gap: 15px;
}

.search-box input {
    flex: 1;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-white);
    padding: 18px 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 15px var(--highlight-glow);
}

.search-box button {
    background: var(--sec-gradient);
    border: none;
    border-radius: 12px;
    color: var(--bg-black);
    font-family: var(--font-mont);
    font-weight: 800;
    font-size: 14px;
    padding: 0 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--highlight-glow);
}

.error-msg {
    color: var(--error);
    margin-top: 15px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Card Sub-text */
.card-sub {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 25px;
}

/* Identity Confirmation */
.identity-block {
    background: #050505;
    border: 1px solid rgba(252, 194, 0, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.identity-name {
    font-family: var(--font-mont);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 8px;
}

.identity-email {
    color: var(--text-gray);
    font-size: 14px;
}

.identity-email span {
    color: var(--highlight);
    font-weight: 600;
}

/* Button Variants */
.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 12px;
    font-family: var(--font-mont);
    font-weight: 800;
    font-size: 14px;
    padding: 16px 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--sec-gradient);
    color: var(--bg-black);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--highlight-glow);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    border-color: var(--highlight);
    color: var(--highlight);
}

.action-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.action-row button {
    flex: 1;
    max-width: 220px;
}

/* OTP Input */
.otp-box {
    margin-bottom: 25px;
}

#otp-input {
    width: 100%;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--highlight);
    padding: 22px 25px;
    font-family: var(--font-mont);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

#otp-input:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 20px var(--highlight-glow);
}

/* Resend */
.resend-row {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-gray);
}

.link-btn {
    background: none;
    border: none;
    color: var(--highlight);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    padding: 0 4px;
}

.link-btn:disabled {
    color: var(--text-gray);
    cursor: not-allowed;
}

.link-btn:not(:disabled):hover {
    text-decoration: underline;
}

/* Submitted List */
.submitted-list {
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
    text-align: left;
}

.submitted-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.submitted-list-item:last-child {
    border-bottom: none;
}

.submitted-list-item .h-name {
    font-family: var(--font-mont);
    font-weight: 700;
    color: var(--text-white);
}

.submitted-list-item .h-meta {
    font-size: 12px;
    color: var(--text-gray);
}

.success-icon.small {
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-width: 3px;
    margin: 0 auto 20px;
}

/* Final confirmation checkbox */
.final-check {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-mid);
    cursor: pointer;
}

.final-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--highlight);
    cursor: pointer;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(252, 194, 0, 0.2);
    border-top-color: var(--highlight);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Premium auto-clone cards */
.horse-card.premium-card {
    cursor: default;
    border-color: rgba(252, 194, 0, 0.3);
    background: linear-gradient(135deg, #1a1605 0%, #151515 80%);
}

.horse-card.premium-card:hover {
    transform: none;
    border-color: rgba(252, 194, 0, 0.3);
    background: linear-gradient(135deg, #1a1605 0%, #151515 80%);
}

.selection-check.auto {
    color: var(--highlight);
    font-weight: 700;
}

.auto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--highlight);
    color: var(--bg-black);
    font-weight: 900;
    font-size: 14px;
    flex-shrink: 0;
}

/* AUTO badge pill on section header */
.auto-badge {
    display: inline-block;
    background: rgba(252, 194, 0, 0.15);
    color: var(--highlight);
    border: 1px solid rgba(252, 194, 0, 0.3);
    font-family: var(--font-mont);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1.5px;
    padding: 8px 16px;
    border-radius: 50px;
}

/* Case D auto-allocation panel */
.case-d-panel {
    background: var(--primary-gradient);
    border: 1px solid rgba(252, 194, 0, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.case-d-panel h3 {
    font-family: var(--font-mont);
    font-size: 22px;
    margin: 15px 0 12px;
    text-transform: none;
}

.case-d-panel h3 span {
    color: var(--highlight);
}

/* Confirmation list group labels */
.confirm-group-label {
    font-family: var(--font-mont);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-gray);
    padding: 12px 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 8px;
}

.confirm-group-label:first-child {
    margin-top: 0;
}

.submitted-list-item.auto-item {
    opacity: 0.85;
}

.submitted-list-item.auto-item .h-name::before {
    content: '✓ ';
    color: var(--highlight);
    font-weight: 900;
}

/* Stat cards layout — now 4 possible tiles, may wrap on small screens */
.compensation-stats {
    flex-wrap: wrap;
}

.stat-card {
    min-width: 130px;
    padding: 16px 20px;
}

/* Onboarding modal (first-time walkthrough) */
.onboarding-content {
    max-width: 520px;
    padding: 50px 45px 35px;
    text-align: center;
    position: relative;
}

/* Override .modal-content button default for onboarding-specific buttons */
.onboarding-content .onboarding-skip,
.modal-content .onboarding-skip {
    position: absolute;
    top: 16px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-family: var(--font-inter);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.2s;
}

.onboarding-content .onboarding-skip:hover {
    color: var(--highlight);
    background: transparent;
}

/* Scoped button overrides — beat generic .modal-content button */
.onboarding-content .btn-primary,
.onboarding-content .btn-secondary,
.rules-modal-content .btn-primary {
    padding: 14px 26px;
    font-family: var(--font-mont);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.5px;
    border-radius: 12px;
}

.onboarding-content .btn-primary,
.rules-modal-content .btn-primary {
    background: var(--sec-gradient);
    color: var(--bg-black);
    border: none;
}

.onboarding-content .btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.onboarding-content .btn-secondary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.onboarding-step {
    animation: fadeIn 0.35s ease;
}

/* Shadcn-inspired badge icon container */
.onboarding-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(252, 194, 0, 0.18) 0%, rgba(252, 194, 0, 0.04) 100%);
    border: 1px solid rgba(252, 194, 0, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--highlight);
    margin: 0 auto 22px;
    position: relative;
    box-shadow: 0 0 30px rgba(252, 194, 0, 0.1);
}

.onboarding-icon svg {
    width: 28px;
    height: 28px;
}

.onboarding-content h2 {
    font-family: var(--font-mont);
    font-size: 24px;
    margin-bottom: 12px;
}

.onboarding-content h2 span {
    color: var(--highlight);
}

.onboarding-content .card-sub {
    margin-bottom: 20px;
    line-height: 1.6;
}

.onboarding-summary {
    background: #050505;
    border: 1px solid rgba(252, 194, 0, 0.2);
    border-radius: 14px;
    padding: 18px;
    text-align: left;
    margin-bottom: 10px;
}

.onb-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.onb-row:last-of-type {
    border-bottom: none;
}

.onb-row-label {
    font-family: var(--font-mont);
    font-size: 15px;
    font-weight: 700;
    color: var(--highlight);
    margin-bottom: 3px;
}

.onb-row-note {
    font-size: 13px;
    color: var(--text-gray);
}

.onb-total {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(252, 194, 0, 0.2);
    font-family: var(--font-mont);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-mid);
    text-align: center;
}

.onb-total span {
    color: var(--highlight);
    font-size: 20px;
    font-weight: 900;
    margin-left: 6px;
}

.onboarding-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.onboarding-checklist li {
    padding: 12px 0 12px 30px;
    position: relative;
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.onboarding-checklist li:last-child {
    border-bottom: none;
}

.onboarding-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--highlight);
    color: var(--bg-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
}

.onboarding-nav {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.onboarding-dots {
    display: flex;
    gap: 8px;
}

.onboarding-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.25s ease;
}

.onboarding-dots .dot.active {
    background: var(--highlight);
    width: 28px;
    border-radius: 50px;
}

.onboarding-nav .action-row {
    width: 100%;
}

.onboarding-nav .action-row button {
    min-width: 130px;
}

/* "How is this calculated" info trigger */
.info-trigger-row {
    display: flex;
    justify-content: flex-end;
    margin: -20px 0 35px 0;
}

.info-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-mid);
    font-family: var(--font-inter);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.info-link:hover {
    color: var(--highlight);
    border-color: var(--highlight);
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(252, 194, 0, 0.15);
    color: var(--highlight);
    font-weight: 700;
    font-size: 12px;
}

/* Rules modal */
.rules-modal-content {
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    text-align: left;
    padding: 40px 45px;
    scrollbar-width: thin;
    scrollbar-color: rgba(252, 194, 0, 0.3) transparent;
}

/* Webkit scrollbar — thin, gold accent, matches theme */
.rules-modal-content::-webkit-scrollbar {
    width: 6px;
}

.rules-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.rules-modal-content::-webkit-scrollbar-thumb {
    background: rgba(252, 194, 0, 0.25);
    border-radius: 10px;
}

.rules-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 194, 0, 0.45);
}

.rules-modal-content h2 {
    text-align: center;
    margin-bottom: 10px;
}

.rules-modal-content .card-sub {
    text-align: center;
    margin-bottom: 30px;
}

.rules-block {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rules-block:last-of-type {
    border-bottom: none;
}

.rule-heading {
    font-family: var(--font-mont);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--highlight);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.rules-block p {
    color: var(--text-mid);
    font-size: 14px;
    line-height: 1.6;
}

.rules-block strong {
    color: var(--text-white);
}

.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.rules-table th,
.rules-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rules-table th {
    background: rgba(252, 194, 0, 0.07);
    color: var(--highlight);
    font-family: var(--font-mont);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rules-table td {
    color: var(--text-mid);
}

.rules-table td:last-child {
    color: var(--text-white);
    font-weight: 600;
}

/* Your case block */
.your-case-block {
    background: #050505;
    border: 1px solid rgba(252, 194, 0, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-top: 10px;
}

.your-case-title {
    font-family: var(--font-mont);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--highlight);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.your-case-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.your-case-list li {
    padding: 10px 0 10px 24px;
    position: relative;
    color: var(--text-mid);
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.your-case-list li:last-child {
    border-bottom: none;
}

.your-case-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--highlight);
    font-weight: 700;
}

.your-case-list strong {
    color: var(--text-white);
}

.your-case-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(252, 194, 0, 0.2);
    font-family: var(--font-mont);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-mid);
    text-align: center;
}

.your-case-total span {
    color: var(--highlight);
    font-size: 22px;
    font-weight: 900;
    margin-left: 6px;
}

/* Horse selection section spacing between multiple sections */
.horse-selection-section {
    margin-bottom: 40px;
}

.horse-selection-section:last-of-type {
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .compensation-stats {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard */
main#portal-dashboard {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
    background: var(--primary-gradient);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px 35px;
}

.user-info h2 {
    font-family: var(--font-mont);
    font-size: 32px;
    margin-bottom: 5px;
}

.user-email {
    color: var(--text-gray);
    font-size: 16px;
    margin-bottom: 15px;
}

.uid-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    color: var(--highlight);
    border: 1px solid rgba(252, 194, 0, 0.2);
}

.compensation-stats {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.stat-card {
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 28px;
    border-radius: 16px;
    text-align: center;
    min-width: 160px;
}

.stat-card.elite {
    border-left: 4px solid var(--highlight);
}

.stat-card.premium {
    border-left: 4px solid #ffffff;
}

.stat-card .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.stat-card .value {
    display: block;
    font-family: var(--font-mont);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.stat-card.elite .value {
    color: var(--highlight);
}

/* Horse Grid */
.horse-selection-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.section-header h3 {
    font-family: var(--font-mont);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.section-sub {
    font-size: 14px;
    color: var(--text-gray);
    max-width: 600px;
}

.section-sub span {
    color: var(--highlight);
    font-weight: 700;
}

.selection-counter {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #050505;
    border: 1px solid rgba(252, 194, 0, 0.25);
    padding: 10px 18px;
    border-radius: 50px;
    white-space: nowrap;
}

.counter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-gray);
}

.counter-value {
    font-family: var(--font-mont);
    font-size: 16px;
    font-weight: 800;
    color: var(--highlight);
}

.horse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.horse-card {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.horse-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(252, 194, 0, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.horse-card:hover {
    border-color: rgba(252, 194, 0, 0.4);
    background: #1a1a1a;
    transform: translateY(-2px);
}

.horse-card.selected {
    border-color: var(--highlight);
    background: #1a1605;
    box-shadow: 0 10px 30px rgba(252, 194, 0, 0.15), inset 0 0 0 1px var(--highlight);
}

.horse-card.selected::before {
    opacity: 1;
}

.horse-grade-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 4px;
    background: #333;
    color: #fff;
}

.horse-grade-badge.grade-1 {
    background: var(--highlight);
    color: var(--bg-black);
}

.horse-grade-badge.grade-2 {
    background: #fff;
    color: var(--bg-black);
}

.horse-name {
    font-family: var(--font-mont);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 5px;
}

.horse-id {
    color: var(--text-gray);
    font-size: 12px;
}

.selection-check {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-mid);
}

.checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.checkbox::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid var(--bg-black);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.6);
    margin-top: -2px;
}

.horse-card.selected .checkbox {
    border-color: var(--highlight);
    background: var(--highlight);
}

.horse-card.selected .checkbox::after {
    transform: rotate(45deg) scale(1);
}

.horse-card.selected .selection-check span {
    color: var(--highlight);
    font-weight: 700;
}

/* Action Area */
.action-area {
    text-align: center;
    padding-bottom: 100px;
}

.submit-btn {
    background: var(--sec-gradient);
    border: none;
    border-radius: 50px;
    color: var(--bg-black);
    font-family: var(--font-mont);
    font-weight: 900;
    font-size: 18px;
    padding: 20px 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(1);
}

.action-note {
    margin-top: 20px;
    color: var(--text-gray);
    font-size: 13px;
}

/* Footer */
.portal-footer {
    text-align: center;
    padding: 40px;
    color: #444;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--highlight);
    padding: 60px;
    border-radius: 30px;
    max-width: 500px;
    text-align: center;
}

.success-icon {
    font-size: 64px;
    color: var(--highlight);
    border: 4px solid var(--highlight);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    margin: 0 auto 30px;
}

.modal-content h2 {
    font-family: var(--font-mont);
    font-size: 28px;
    margin-bottom: 15px;
}

.modal-content p {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.modal-content button {
    background: var(--highlight);
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-family: var(--font-mont);
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 768px) {
    .user-overview {
        flex-direction: column;
        padding: 22px 20px;
        gap: 24px;
        margin-bottom: 36px;
    }

    .user-info h2 {
        font-size: 22px;
    }

    .compensation-stats {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        min-width: unset;
        padding: 14px 16px;
    }

    .portal-header h1 {
        font-size: 32px;
    }

    .submit-btn {
        width: 100%;
        padding: 18px 20px;
        font-size: 16px;
    }

    .modal-content {
        padding: 36px 24px;
        border-radius: 20px;
        margin: 16px;
        max-width: calc(100vw - 32px);
    }

    .modal-content h2 {
        font-size: 22px;
    }

    .onboarding-content {
        padding: 44px 22px 28px;
        max-width: calc(100vw - 32px);
    }

    .rules-modal-content {
        padding: 28px 20px;
        max-height: 92vh;
        max-width: calc(100vw - 32px);
    }

    #otp-input {
        font-size: 24px;
        letter-spacing: 8px;
        padding: 18px 16px;
    }

    .horse-grid {
        grid-template-columns: 1fr;
    }

    .section-header h3 {
        font-size: 17px;
    }

    .info-trigger-row {
        margin: -10px 0 24px 0;
    }
}