:root {
    /* Brand Colors */
    --sheep-green: #2c7744;
    --sheep-green-dark: #1e5a32;
    --sheep-green-light: #3a9c5a;
    --sheep-orange: #f28c38;
    --sheep-orange-dark: #d16f1e;
    /* Text / neutral */
    --sheep-light-bg: #f8f9fa;
    --sheep-dark: #1e293b;
    --sheep-gray: #6c757d;
    /* Surface tokens */
    --surface-bg: #ffffff;
    --surface-bg-soft: #f8fafc;
    --surface-bg-accent: #eef8f0;
    --surface-bg-glass: rgba(255, 255, 255, 0.82);
    --surface-border: rgba(30, 41, 59, 0.08);
    --surface-border-strong: rgba(30, 41, 59, 0.14);
    --surface-shadow: 0 8px 24px rgba(0,0,0,0.12);
    --surface-shadow-hover: 0 12px 32px rgba(0,0,0,0.16);
    --text-muted-color: #6c757d;
    /* Design tokens */
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.25s ease;
    /* Layout */
    --navbar-height: 56px;
    --sidebar-collapsed: 58px;
    --sidebar-expanded: 300px;
    --sidebar-push-collapsed: calc(var(--sidebar-collapsed) + 8px);
    --sidebar-push-expanded: calc(var(--sidebar-expanded) + 8px);
}

/* Dark mode */
[data-theme="dark"] {
    --sheep-light-bg: #0f172a;
    --sheep-dark: #e2e8f0;
    --sheep-gray: #94a3b8;
    --surface-bg: #172033;
    --surface-bg-soft: #1e293b;
    --surface-bg-accent: #1d3a2a;
    --surface-bg-glass: rgba(23, 32, 51, 0.82);
    --surface-border: rgba(148, 163, 184, 0.16);
    --surface-border-strong: rgba(148, 163, 184, 0.28);
    --surface-shadow: 0 10px 28px rgba(0,0,0,0.38);
    --surface-shadow-hover: 0 16px 36px rgba(0,0,0,0.48);
    --text-muted-color: #94a3b8;
    background-color: #0f172a;
    color: #e2e8f0;
}

/* Base page colors */
html,
body {
    background-color: var(--sheep-light-bg);
    color: var(--sheep-dark);
}

h1[tabindex="-1"]:focus {
    outline: none;
}

/* Global utilities */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-sheep-green {
    color: var(--sheep-green) !important;
}

.text-sheep-orange {
    color: var(--sheep-orange) !important;
}

.text-muted {
    color: var(--text-muted-color) !important;
}

    .text-muted.small {
        font-size: 0.875rem;
        line-height: 1.3;
        color: var(--text-muted-color) !important;
    }

.bg-surface {
    background: var(--surface-bg) !important;
}

.bg-surface-soft {
    background: var(--surface-bg-soft) !important;
}

.bg-surface-accent {
    background: var(--surface-bg-accent) !important;
}

.border-surface {
    border-color: var(--surface-border) !important;
}

/* Prevent horizontal overflow */
body,
html,
.d-flex.flex-column.min-vh-100 {
    overflow-x: hidden;
}

/* Top Navbar */
.sheep-topbar {
    background: var(--sheep-green);
    border-bottom: 1px solid var(--sheep-green-dark);
    box-shadow: var(--shadow-sm);
    z-index: 1030;
}

    .sheep-topbar .navbar-brand img {
        height: 42px;
        transition: var(--transition);
    }

/* Sidebar */
.sheep-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-collapsed);
    background: var(--sheep-green-dark);
    color: white;
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1020;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

@media (min-width: 992px) {
    .sheep-sidebar {
        display: flex !important;
    }
}

.sheep-sidebar:hover,
.sheep-sidebar.expanded {
    width: var(--sidebar-expanded);
    overflow-x: visible;
    box-shadow: 4px 0 16px rgba(0,0,0,0.25);
}

/* Sidebar logo badge */
.sheep-sidebar-logo {
    /* Circle diameter = square image diagonal */
    --logo-image-size: 150px;
    --logo-circle-size: 220px;
    width: var(--logo-circle-size);
    height: var(--logo-circle-size);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    border-radius: 50%;
    /* Default border */
    border: 5px solid var(--sheep-green-light);
    background: var(--surface-bg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(44, 119, 68, 0.10), inset 0 3px 10px rgba(255, 255, 255, 0.75);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

    /* The actual image stays square. No clipping. */
    .sheep-sidebar-logo img {
        width: var(--logo-image-size);
        height: var(--logo-image-size);
        display: block;
        object-fit: contain;
        object-position: center;
        border-radius: 0;
        background: transparent;
        image-rendering: -webkit-optimize-contrast;
    }

.sheep-sidebar:hover .sheep-sidebar-logo,
.sheep-sidebar.expanded .sheep-sidebar-logo {
    opacity: 1;
    pointer-events: auto;
    animation: gentlePulse 6s ease-in-out infinite;
    animation-delay: 1.5s;
}

    /* Mouse-over: thick orange ring */
    .sheep-sidebar:hover .sheep-sidebar-logo:hover,
    .sheep-sidebar.expanded .sheep-sidebar-logo:hover {
        transform: scale(1.06) rotate(5deg);
        border-color: var(--sheep-orange);
        box-shadow: 0 16px 42px rgba(242, 140, 56, 0.22), 0 0 0 7px rgba(242, 140, 56, 0.28), 0 0 0 11px rgba(242, 140, 56, 0.10), inset 0 4px 14px rgba(255, 255, 255, 0.85);
        filter: brightness(1.04) contrast(1.02);
    }

@@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.015);
    }
}

@@media (prefers-reduced-motion: reduce) {
    .sheep-sidebar-logo,
    .sheep-sidebar-logo:hover {
        transition: none;
        transform: none !important;
        animation: none !important;
    }
}

/* Sidebar nav links */
.sheep-sidebar .nav-link {
    color: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    margin: 3px 4px;
    padding: 10px 8px;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

    .sheep-sidebar .nav-link i {
        font-size: 1.45rem;
        width: 28px;
        text-align: center;
        flex-shrink: 0;
    }

    .sheep-sidebar .nav-link span {
        margin-left: 12px;
        opacity: 0;
        transition: opacity 0.25s ease;
    }

.sheep-sidebar:hover .nav-link span,
.sheep-sidebar.expanded .nav-link span {
    opacity: 1;
}

.sheep-sidebar .nav-link:hover {
    color: var(--sheep-orange) !important;
    background: rgba(242, 140, 56, 0.12);
}

.sheep-sidebar .nav-link.active,
.sheep-sidebar .nav-link[aria-current="page"] {
    color: var(--sheep-orange) !important;
    background: rgba(242, 140, 56, 0.20);
    font-weight: 600;
}

    .sheep-sidebar .nav-link:hover i,
    .sheep-sidebar .nav-link.active i {
        color: var(--sheep-orange);
    }

/* Collapsed mode */
.sheep-sidebar:not(:hover):not(.expanded) .nav-link span {
    width: 0;
    overflow: hidden;
    margin-left: 0 !important;
    opacity: 0;
}

.sheep-sidebar:not(:hover):not(.expanded) .nav-link {
    justify-content: center;
    padding: 10px 0;
}

    .sheep-sidebar:not(:hover):not(.expanded) .nav-link i {
        margin: 0 auto;
    }

/* Content push */
@media (min-width: 992px) {
    .main-content {
        padding-left: var(--sidebar-push-collapsed);
        transition: padding-left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sheep-sidebar:hover ~ .main-content,
    .sheep-sidebar.expanded ~ .main-content {
        padding-left: var(--sidebar-push-expanded);
    }
}

/* Bottom nav */
.sheep-bottom-nav {
    background: var(--sheep-green);
    border-top: 1px solid var(--sheep-green-dark);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    padding-bottom: env(safe-area-inset-bottom);
}

    .sheep-bottom-nav .nav-link {
        padding: .4rem .25rem;
        line-height: 1.1;
    }

    .sheep-bottom-nav small {
        font-size: .70rem;
    }

    .sheep-bottom-nav .nav-link.active {
        font-weight: 600;
        text-decoration: none;
        opacity: 1;
    }

/* Offcanvas mobile */
.offcanvas-start {
    width: 85% !important;
    max-width: 320px;
}

/* Mobile content padding */
@media (max-width: 991.98px) {
    .main-content {
        padding-bottom: 80px;
    }
}

/* intl-tel-input helpers */
.iti {
    width: 100%;
}

.iti__tel-input {
    width: 100%;
}

.sheep-public-page {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sheep-public-hero,
.sheep-public-card {
    border-radius: 1.25rem;
    padding: 1.5rem;
    background: var(--bs-body-bg);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.06);
}

.sheep-public-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
}

.sheep-company-details {
    display: grid;
    gap: 1rem;
    margin: 0;
}

    .sheep-company-details div {
        display: grid;
        grid-template-columns: minmax(150px, 240px) 1fr;
        gap: 1rem;
    }

    .sheep-company-details dt {
        font-weight: 700;
        color: var(--bs-secondary-color);
    }

    .sheep-company-details dd {
        margin: 0;
    }

.sheep-legal-content {
    line-height: 1.7;
}

    .sheep-legal-content h2,
    .sheep-legal-content h3 {
        margin-top: 1.75rem;
    }

    .sheep-legal-content p,
    .sheep-legal-content li {
        color: var(--bs-body-color);
    }

.sheep-public-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.03);
    font-size: 0.875rem;
}

[data-theme="dark"] .sheep-public-footer,
.theme-dark .sheep-public-footer {
    background: rgba(255, 255, 255, 0.035);
    border-top-color: rgba(255, 255, 255, 0.12);
}

.sheep-public-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sheep-public-footer-company {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--bs-secondary-color);
}

    .sheep-public-footer-company strong {
        color: var(--bs-body-color);
    }

.sheep-public-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

    .sheep-public-footer-links a {
        color: var(--bs-body-color);
        text-decoration: none;
        font-weight: 500;
    }

        .sheep-public-footer-links a:hover {
            text-decoration: underline;
        }

@media (max-width: 767.98px) {
    .sheep-public-footer {
        padding-bottom: 5.25rem;
    }

    .sheep-public-footer-inner {
        align-items: flex-start;
    }

    .sheep-public-footer-links {
        flex-direction: column;
        gap: 0.4rem;
    }

    .sheep-company-details div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}