body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #1a202c;

    /* Prevent accidental horizontal scrolling from overflowing elements */
    overflow-x: hidden;
}

/* Site container for centering content on large screens */
/*
 * Site container for centering content on large screens.  Increase the
 * maximum width to allow more breathing room on desktop while still
 * centering the content.  On very wide displays the content will
 * remain centered with generous margins; on narrow screens it will
 * take the full width.
 */
.site-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Global list reset to remove bullets and default padding */
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Spacing for navigation items */
nav ul {
    display: flex;
    gap: 1rem;
}

nav ul li {
    margin: 0;
}

/* Simple toolbar styling for content editor */
.toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.toolbar button {
    background-color: #e5e7eb;
    color: #1a202c;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toolbar button:hover {
    background-color: #d1d5db;
}

/* Content editable area styling */
.content-editor {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.75rem;
    min-height: 200px;
    background-color: #ffffff;
    overflow-y: auto;
}

/* Center admin content with max width */
.admin-content {
    /* Fill remaining horizontal space next to the sidebar */
    flex: 1;
    padding: 1rem;
    width: 100%;
}
header, footer {
    background-color: #fff;
}
.container {
    width: 100%;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}
.border {
    border: 1px solid #e2e8f0;
}
.shadow {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}
.rounded {
    border-radius: 0.25rem;
}
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.hover\:underline:hover { text-decoration: underline; }

/* Custom utility classes for the Absence Check B2B site */
.btn-primary {
    display: inline-block;
    background-color: #1d4ed8;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.btn-primary:hover {
    background-color: #2563eb;
}
.btn-secondary {
    display: inline-block;
    background-color: #e5e7eb;
    color: #1a202c;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.btn-secondary:hover {
    background-color: #d1d5db;
}
/* Hero section styling */
.hero {
    background-size: cover;
    background-position: center;
    padding: 4rem 1rem;
    text-align: center;
    color: #ffffff;
    position: relative;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Darken the overlay slightly to improve text legibility on light hero images */
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Improve hero text legibility with a subtle text shadow */
.hero h1,
.hero p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}
.hero > * {
    position: relative;
    z-index: 2;
}
.features {
    padding: 2rem 1rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: left;
}
.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}
/* Alert colors */
.bg-green-100 { background-color: #d1fae5; }
.text-green-700 { color: #047857; }
.border-green-300 { border-color: #6ee7b7; }
/* Error alert colours */
.border-red-300 { border-color: #fca5a5; }

/* Admin layout classes */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ------------------------------------------------------------------
 * Header and navigation styling
 *
 * The classes below style the public header.  A sticky header with a
 * bottom border keeps navigation visible as users scroll.  The logo
 * block stacks the site name above a short tagline.  Navigation links
 * are spaced evenly, and the client login button stands out as a call
 * to action.  Colours are kept consistent with the rest of the site
 * and avoid dependence on any external CSS frameworks.
 */
/*
 * Header styling
 *
 * Set a professional, dark background colour so that the white text in
 * the logo remains legible.  Remove the border and use a subtle
 * shadow to delineate the header from the page content.  On smaller
 * screens, the header still sticks to the top to maintain visibility.
 */
.site-header {
    background-color: #4f46e5; /* primary indigo */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Align items inside the header container.  Using flex here ensures that
 * the logo block, navigation list, and call‑to‑action button share the
 * same horizontal baseline and distribute space evenly.  Without this,
 * the logo and nav may drift to one side when the container width
 * expands.
 */
.site-header .site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    text-decoration: none;
}

.tagline {
    font-size: 0.75rem;
    color: #d1d5db; /* light grey for contrast on dark header */
}

.nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #f3f4f6; /* light colour on dark header */
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-link.active {
    color: #c7d2fe; /* lighter indigo for active */
    font-weight: 600;
}

.nav-link:hover {
    text-decoration: underline;
    color: #e0e7ff;
}

/*
 * Dropdown navigation
 *
 * Group related menu items under a parent.  When hovering or focusing
 * on the parent list item, the nested dropdown becomes visible.  On
 * mobile devices, tapping the parent will focus it, triggering the
 * drop-down.  Nested lists are hidden by default and positioned
 * absolutely below the parent item.  Adjust min-width and padding as
 * desired.
 */
.nav-item {
    position: relative;
}
.nav-item .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 12rem;
    z-index: 100;
}
.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown {
    display: block;
}
.dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
}
.dropdown-link.active {
    color: #4f46e5;
    font-weight: 600;
}
.dropdown-link:hover {
    background-color: #f3f4f6;
    color: #4f46e5;
}

.nav-cta {
    margin-left: auto;
    background-color: #ffffff;
    color: #4f46e5;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.nav-cta:hover {
    background-color: #e0e7ff;
}

/* Center footer content within its container.  Without a flex layout,
 * some themes may align the text to the right.  This rule ensures
 * consistent centering across breakpoints.  If additional footer links
 * are added later, justify-content can be adjusted accordingly.
 */
footer .site-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
}

/*
 * Additional utility classes to support legacy markup and ensure spacing
 * and styling are applied consistently even if Tailwind-style classes
 * remain in templates.  These definitions are intentionally succinct
 * to avoid bloat while providing essential behaviour.
 */
.gap-6 {
    gap: 1.5rem;
}
.font-medium {
    font-weight: 500;
}
.text-blue-600 {
    color: #2563eb;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Flex utilities
 *
 * Many templates still reference Tailwind-style flex classes such as
 * `.flex-col`, `.flex-row` and `.flex-wrap`.  Without definitions for
 * these classes, elements default to row layouts or ignore wrapping,
 * causing headers and footers to align incorrectly.  Define them here
 * so that any container using `.flex` will honour the intended
 * direction and wrapping behaviour.
 */
.flex-col {
    flex-direction: column;
}
.flex-row {
    flex-direction: row;
}
.flex-wrap {
    flex-wrap: wrap;
}

/* Margin utility
 *
 * The `.mt-auto` class pushes an element to the bottom of its flex
 * container by adding an automatic top margin.  Without this class,
 * footers may not stick to the bottom of the viewport on pages with
 * little content.
 */
.mt-auto {
    margin-top: auto;
}

/* Overflow utility
 *
 * Provide a utility class to hide horizontal overflow when needed.
 */
.overflow-x-hidden {
    overflow-x: hidden;
}

/* Logo image sizing */
.logo-link {
    display: inline-block;
}

.logo-img {
    height: 48px;
    width: auto;
    display: block;
}

/* Page hero image styling
 * Limit the height of hero images on standard pages to avoid
 * overwhelming the layout.  The object-fit property crops the
 * image to fill the width while preserving aspect ratio.
 */
.page-hero-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: top;
    display: block;
}
.admin-nav {
    width: 240px;
    background-color: #f9fafb;
    border-right: 1px solid #e2e8f0;
    padding: 1rem;
}
.admin-nav a {
    display: block;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    color: #1a202c;
    font-weight: 500;
    text-decoration: none;
}
.admin-nav a:hover {
    color: #2563eb;
}
.admin-content {
    flex: 1;
    padding: 1rem;
}
.bg-red-100 { background-color: #fee2e2; }
.text-red-700 { color: #b91c1c; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-700 { background-color: #1d4ed8; }
.text-white { color: #fff; }
.bg-gray-100 { background-color: #f7fafc; }
.bg-gray-50 { background-color: #f9fafb; }
.text-gray-500 { color: #6b7280; }
.border-t { border-top: 1px solid #e2e8f0; }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.rounded { border-radius: 0.25rem; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.text-red-700 { color: #c53030; }
.text-gray-900 { color: #1a202c; }
.underline { text-decoration: underline; }
.hover\:underline:hover { text-decoration: underline; }

/*
 * Feature images used on the Features template. These styles ensure that
 * images maintain their aspect ratio, fill the available width and crop
 * appropriately without distortion. A gentle border-radius rounds the
 * corners for a polished look.
 */
.feature-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
}