:root {
    /* Main theme colors */
    --color-primary: #5C4033;      /* Dark brown */
    --color-secondary: #C96A4A;    /* Terracotta */
    --color-accent: #E9D7C0;       /* Light beige */

    /* Supporting colors */
    --color-bg: #F8F2EA;
    --color-surface: #FFFFFF;
    --color-text: #2B1D17;
    --color-muted: #7A6256;

    /* Soft hover/background variants */
    --color-primary-soft: rgba(92, 64, 51, 0.10);
    --color-secondary-soft: rgba(201, 106, 74, 0.12);
    --color-accent-soft: rgba(233, 215, 192, 0.45);

    /* UI settings */
    --shadow-soft: 0 8px 24px rgba(92, 64, 51, 0.12);
    --radius-lg: 18px;
    --radius-pill: 999px;
}

.card .table-responsive {
    min-height: 200px;
    background-color: #fff;
}

body {
    /* background: #f8fafc; */
    background: var(--color-bg);
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.form-check-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(165, 42, 42, 0.25);
}

.no-underline{ text-decoration: none; }

.text-main{ color: var(--color-primary); }
.bg-main{ background-color: var(--color-primary); }

.text-submain{ color: var(--color-secondary); }
.bg-submain{ background-color: var(--color-secondary); }

.text-accent{ color: var(--color-accent); }
.bg-accent{ background-color: var(--color-accent); }

.rounded-5-left {
    border-radius: 20px 0 0 20px !important;
}

.rounded-5-right {
    border-radius: 0 20px 20px 0 !important;
}

/* Filled dark brown button */
.btn-main {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4A3329;
    --bs-btn-hover-border-color: #4A3329;

    --bs-btn-focus-shadow-rgb: 92, 64, 51;

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3F2B23;
    --bs-btn-active-border-color: #3F2B23;

    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--color-primary);
    --bs-btn-disabled-border-color: var(--color-primary);
}

/* Outlined dark brown button */
.btn-outline-main {
    --bs-btn-color: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--color-primary);
    --bs-btn-hover-border-color: var(--color-primary);

    --bs-btn-focus-shadow-rgb: 92, 64, 51;

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--color-primary);
    --bs-btn-active-border-color: var(--color-primary);

    --bs-btn-disabled-color: var(--color-primary);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--color-primary);
}

/* Filled terracotta button */
.btn-submain {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--color-secondary);
    --bs-btn-border-color: var(--color-secondary);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #B85D40;
    --bs-btn-hover-border-color: #B85D40;

    --bs-btn-focus-shadow-rgb: 201, 106, 74;

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #A95238;
    --bs-btn-active-border-color: #A95238;

    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--color-secondary);
    --bs-btn-disabled-border-color: var(--color-secondary);
}

/* Outlined terracotta button */
.btn-outline-submain {
    --bs-btn-color: var(--color-secondary);
    --bs-btn-border-color: var(--color-secondary);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--color-secondary);
    --bs-btn-hover-border-color: var(--color-secondary);

    --bs-btn-focus-shadow-rgb: 201, 106, 74;

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--color-secondary);
    --bs-btn-active-border-color: var(--color-secondary);

    --bs-btn-disabled-color: var(--color-secondary);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--color-secondary);
}

/* HORSE CARDS */
.horse-card {
    position: relative;
    overflow: hidden;
    background: var(--color-surface);
    color: var(--color-text);
    transition: 0.2s ease;
}

.horse-card:hover,
.horse-card:focus {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft) !important;
    background: var(--color-accent-soft);
}

.horse-card-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: var(--color-accent);
    padding: 0.25rem;
    transition: 0.2s ease;
}

.horse-card:hover .horse-card-img,
.horse-card:focus .horse-card-img {
    transform: scale(1.06);
}

.horse-hover-badge {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-pill);
    background: var(--color-secondary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(6px);
    transition: 0.2s ease;
}

.horse-card:hover .horse-hover-badge,
.horse-card:focus .horse-hover-badge {
    opacity: 1;
    transform: translateY(0);
}


/* NAVBAR DATA */
.app-navbar {
    background: var(--color-primary);
    backdrop-filter: none;
    box-shadow: var(--shadow-soft);
}

.app-navbar.border-bottom {
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

.navbar-brand {
    letter-spacing: -0.03em;
    color: var(--color-bg);
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: #fff;
}


.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-secondary);
    color: #fff;
    margin-right: 0.6rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
    color: var(--color-bg);
    border-radius: var(--radius-pill);
    padding: 0.55rem 0.9rem !important;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: var(--radius-pill);
    padding: 0.55rem 1rem;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}


/* OTHER */
.horse-img-donut {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--color-accent);
    padding: 6px;
}

.horse-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.landing-page {
    background:
        radial-gradient(circle at top left, rgba(197, 155, 95, 0.18), transparent 28rem),
        radial-gradient(circle at top right, rgba(47, 93, 80, 0.14), transparent 26rem),
        linear-gradient(180deg, #ffffff 0%, #f7f1e8 100%);
}

@media (max-width: 768px) {
    .mobile-card-table-wrapper {
        overflow-x: visible;
    }

    .mobile-card-table {
        min-width: 0 !important;
        width: 100%;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr {
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 1.5rem;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.04);
    }

    /* Turn off weird table-hover behavior on mobile */
    .mobile-card-table tbody tr:hover,
    .mobile-card-table tbody tr:hover td,
    .mobile-card-table.table-hover tbody tr:hover,
    .mobile-card-table.table-hover tbody tr:hover td,
    .mobile-card-table.table-hover > tbody > tr:hover > * {
        background-color: #fff !important;
        --bs-table-bg-state: #fff;
        --bs-table-hover-bg: #fff;
    }

    .mobile-card-table td {
        border: 0;
        padding: 0.5rem 0;
        white-space: normal !important;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
        background-color: transparent !important;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.8rem;
        font-weight: 600;
        color: #6c757d;
        margin-bottom: 0.25rem;
    }

    .mobile-card-table td[data-label="Akcje"] {
        text-align: left !important;
    }

    .mobile-card-table td[data-label="Zdjęcie"] {
        text-align: center;
    }

    .mobile-card-table td[data-label="Zdjęcie"]::before {
        display: none;
    }

    .mobile-card-table td[data-label="Zdjęcie"] img {
        display: block;
        width: 150px;
        height: 150px;
        object-fit: cover;
        margin: 0.5rem auto 0;
        padding: 0 !important;
    }

    .mobile-card-table .badge {
        display: inline-block;
        white-space: normal;
        margin-bottom: 0.25rem;
    }

    .mobile-card-table .dropdown-menu {
        max-width: 100%;
    }

    .mobile-card-table p,
    .mobile-card-table h5,
    .mobile-card-table span,
    .mobile-card-table div {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Optional layout: name on the left, action button on the right */
    .mobile-card-table.mobile-actions-title-row tr {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 0.75rem;
        align-items: start;
    }

    .mobile-card-table.mobile-actions-title-row td[data-label="Imię"] {
        grid-column: 1;
        grid-row: 1;
        padding-top: 0;
    }

    .mobile-card-table.mobile-actions-title-row td[data-label="Akcje"] {
        grid-column: 2;
        grid-row: 1;
        width: auto !important;
        justify-self: end;
        text-align: right !important;
        padding-top: 0;
    }

    .mobile-card-table.mobile-actions-title-row td[data-label="Akcje"]::before {
        display: none;
    }

    .mobile-card-table.mobile-actions-title-row td[data-label="Akcje"] .dropdown {
        display: inline-block;
        width: auto;
    }

    .mobile-card-table.mobile-actions-title-row td[data-label="Akcje"] button {
        width: auto;
    }

    .mobile-card-table.mobile-actions-title-row td[data-label="Zdjęcie"],
    .mobile-card-table.mobile-actions-title-row td[data-label="Miejsce"],
    .mobile-card-table.mobile-actions-title-row td[data-label="Informacje"],
    .mobile-card-table.mobile-actions-title-row td[data-label="Info"] {
        grid-column: 1 / -1;
    }
}

/* FOOTER */
.seremona-footer {
    background: transparent;
    border-color: rgba(92, 64, 51, .10) !important;
}

.seremona-footer .border-top {
    border-color: rgba(92, 64, 51, .08) !important;
}

.seremona-footer-logo {
    max-width: 180px;
    height: auto;
}

.seremona-footer-heading {
    color: var(--color-primary);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.seremona-footer-link {
    color: var(--color-muted);
    text-decoration: none;
    transition: color .2s ease;
}

.seremona-footer-link:hover {
    color: var(--color-secondary);
}

.seremona-footer-bottom {
    color: var(--color-muted);
}

@media (max-width: 575.98px) {
    .seremona-footer {
        text-align: center;
    }

    .seremona-footer .row > div,
    .seremona-footer-bottom,
    .seremona-footer-bottom > div {
        align-items: center;
        justify-content: center;
    }
}