:root {
    --green-900: #2d4f3d;
    --green-800: #3d6b52;
    --green-100: #e8f2ec;
    --beige: #ebe7df;
    --surface: #f9fafb;
    --panel: #ffffff;
    --text-main: #111827;
    /*--text-muted: #6b7280;*/
    --text-muted: #4b5563;
    --border: #e5e7eb;
    --outline-border: #2d4f3d;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background: var(--surface);
    color: var(--text-main);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Ensure links are visible inside rich text editors globally */
[contenteditable="true"] a {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

.container {
    width: min(1280px, calc(100% - 2rem));
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.text-danger.validation-summary-errors {
    font-size: 12px;
    color: red;
    border: 1px solid;
    border-radius: 15px;
    padding: 10px;
    background: rgb(255 234 234 / 50%);
}

.top-nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
}

.brand {
    font-weight: 700;
    color: var(--green-900);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0.25rem;
}

a.brand img {
    max-width: 175px;
}

.brand .svg-logo {
    width: 30px;
    height: 30px;
}

.nav-links,
.nav-auth {
    display: flex;
    align-items: center;
    gap: 47px;
    font-weight: 400;
}

nav.nav-links a,
.nav-auth a {
    padding: .7rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

nav.nav-links a.active {
    color: var(--green-900);
    background: var(--green-100);
    font-weight: 600;
}

.nav-auth a {
    /*font-size: 0.875rem;*/
    line-height: 1.25rem;
    border-radius: 8px;
}

.nav-auth {
    gap: 25px;
}

.txt-bold {
    font-weight: bold;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn:focus,
.btn:focus-visible {
    outline: 2px solid #2F5841;
    outline-offset: 2px;
}

.btn-primary {
    background: rgb(47 88 65 / var(--tw-bg-opacity, 1));
    color: #fff;
}

.btn-primary:hover {
    background-color: rgba(61, 107, 82, .95);
}

.btn-outline {
    border-color: var(--outline-border);
    background: #fff;
    border-width: 2px;
}

.btn-outline:hover {
    background: transparent;
}

.focus-ring:focus {
    outline: 2px solid #2F5841;
    outline-offset: 2px;
}


.btn.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-loader {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 9999px;
    animation: btn-spin 0.8s linear infinite;
}

.forget-password,
.signup-link {
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--green-900) !important;
}

.forget-password:hover,
.signup-link:hover {
    text-decoration: underline;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.main-content {
    min-height: calc(100vh - 320px);
}

.page-breadcrumbs {
    width: min(1280px, calc(100% - 2rem));
    max-width: 80rem;
    margin: 14px auto 0;
}

.page-breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.page-breadcrumbs-link {
    color: var(--green-900);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-breadcrumbs-link:focus-visible {
    outline: 2px solid #2F5841;
    outline-offset: 2px;
    border-radius: 4px;
}

.page-breadcrumbs-current {
    color: var(--text-main);
    font-weight: 600;
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 24px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 28px;
}

.footer-brand {
    color: var(--text-muted);
    max-width: 280px;
}

.rounded-full {
    border-radius: 9999px;
}

.footer-brand .brand {
    margin-bottom: 10px;
}

.footer-brand .brand .footer-logo {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brand .brand .footer-logo svg {
    width: 20px;
    height: 20px;
}

.footer-group h4 {
    margin: 0 0 16px;
    color: #0f2230;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.footer-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    color: var(--text-muted);
}

.footer-group ul li a,
.footer-brand,
.footer-bottom {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.footer-group ul li a:hover {
    color: var(--green-900);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    a.brand img {
        max-width: 130px;
    }

    .nav-auth {
        gap: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn-loader {
        animation: none;
    }
}

.literistic-toast-container {
    position: fixed;
    inset: auto;
    right: 20px;
    bottom: 20px;
    margin: 0;
    border: none;
    padding: 0;
    background: transparent;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(92vw, 420px);
    pointer-events: none;
}

.literistic-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #dbe6f1;
    box-shadow: 0 10px 24px rgba(15, 30, 45, 0.16);
    background: #ffffff;
    color: #1f2933;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease;
}

.literistic-toast.is-hidden {
    opacity: 0;
    transform: translateY(8px);
}

.literistic-toast-success {
    border-left: 4px solid #1f8a4c;
}

.literistic-toast-error {
    border-left: 4px solid #c81e1e;
}

.literistic-toast-warning {
    border-left: 4px solid #b7791f;
}

.literistic-toast-info {
    border-left: 4px solid #2563eb;
}

.literistic-toast-message {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

.literistic-toast-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-top: -1px;
}

.literistic-toast-close:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
    border-radius: 4px;
}

.literistic-confirm-modal {
    width: min(92vw, 440px);
    border: 0;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 24px 60px rgba(15, 30, 45, 0.24);
}

.literistic-confirm-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.literistic-confirm-body {
    padding: 24px;
}

.literistic-confirm-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    line-height: 1.3;
    color: #0f172a;
}

.literistic-confirm-text {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.literistic-confirm-actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Style for public mobile menu toggle and dropdown navigation */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    outline: none;
    transition: background 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--green-100);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid #2F5841;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: block;
        order: 2;
    }

    .nav-auth {
        order: 1;
        margin-left: auto;
    }

    .brand {
        order: 0;
    }

    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px 16px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

    .site-header.mobile-menu-open .nav-links {
        display: flex !important;
    }

    nav.nav-links a {
        padding: 12px 16px;
        width: 100%;
        border-radius: 8px;
        font-weight: 500;
        color: var(--text-main);
    }

    nav.nav-links a:hover,
    nav.nav-links a.active {
        background: var(--green-100);
        color: var(--green-900);
    }
}
