/* ============================================
   Taiba Leicester - Main Stylesheet
   ============================================ */

@import url('taiba-tokens.css');
@import url('taiba-components.css');

/* ---- Layout tokens (public site) ---- */
:root {
    --container-width: 1200px;
    --section-padding: 80px;
    --section-padding-mobile: 50px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    font-size: 16px;
    height: -webkit-fill-available;
}

/* Smooth scroll only for anchor links */
html:focus-within {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--stone-800);
    background-color: var(--cream);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--stone-900);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Keyboard focus — quiet for mouse, clear for keyboard */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.hero-nav-btn:focus-visible,
.hero-dot:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.btn-outline-white:focus-visible,
.hero-nav-btn:focus-visible,
.hero-dot:focus-visible {
    outline-color: var(--gold-light);
}

.form-control:focus-visible,
.modern-input:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(95, 37, 95, 0.15);
}

/* ---- Utility Classes ---- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    /* ~60% less side gutter than desktop 24px — Call Log, account, marketing, etc. */
    .container {
        padding-left: 6px;
        padding-right: 6px;
    }
}

.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-gold { color: var(--gold); }
.text-primary { color: var(--primary); }

/* Skip link — visible on keyboard focus only */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 12px 18px;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
    left: 0;
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.bg-white { background-color: var(--white); }
.bg-cream { background-color: var(--cream); }
.bg-primary { background-color: var(--primary); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--gold-btn-fg, #1C1917);
    border-color: var(--gold);
}

.btn-gold:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--gold-btn-fg, #1C1917);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 20px 40px;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* ---- Section Styles ---- */
.section {
    padding: var(--section-padding) 0;
}

@media (max-width: 768px) {
    .section {
        padding: var(--section-padding-mobile) 0;
    }
}

.section-header {
    margin-bottom: 48px;
}

.section-subtitle {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    font-style: italic;
    color: var(--gold-ink, var(--gold));
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--stone-900);
}

@media (max-width: 768px) {
    .section-subtitle {
        font-size: 1.25rem;
    }
    .section-title {
        font-size: 2rem;
    }
}

/* ---- Header ---- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.98);
}

.header.scrolled .nav {
    height: 78px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    transition: height 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}

button.logo {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
}

.logo--desktop-only {
    display: none;
}

.logo img {
    height: 75px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

/* Keep logo fully visible when the bar gently shrinks on scroll */
.header.scrolled .logo img {
    height: 62px;
}

@media (min-width: 1025px) {
    button.logo--admin-menu {
        display: none;
    }
    .logo--desktop-only {
        display: flex;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 600;
    color: var(--stone-700);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--primary);
}

.nav-phone i {
    font-size: 0.875rem;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hamburger {
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Hamburger animates to X when mobile menu is open */
body.menu-open .hamburger {
    background-color: transparent;
}
body.menu-open .hamburger::before {
    transform: rotate(45deg) translate(5px, 6px);
}
body.menu-open .hamburger::after {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 1024px) {
    .nav-menu,
    .nav-cta {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
}

/* ---- Mobile Menu ---- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    max-height: 100%;
    max-height: 100dvh;
    background-color: var(--white);
    z-index: 1001;
    transition: var(--transition-slow);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--stone-100);
}

.mobile-menu-header img {
    height: 40px;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--stone-600);
}

.mobile-nav {
    flex: 1 1 auto;
    min-height: 0; /* allow flex child to shrink + scroll */
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-nav-link {
    display: block;
    padding: 9px 0;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--stone-700);
    border-bottom: 1px solid var(--stone-100);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
}

.mobile-nav .btn {
    margin-top: 10px;
    flex-shrink: 0;
}

.mobile-menu-footer {
    flex-shrink: 0;
    padding: 24px;
    border-top: 1px solid var(--stone-100);
}

.mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    color: var(--primary);
}

/* Short viewports (landscape phones): tighten spacing so more links fit */
@media (max-height: 480px) {
    .mobile-menu-header {
        padding: 10px 16px;
    }
    .mobile-menu-header img {
        height: 32px;
    }
    .mobile-nav {
        padding: 10px 16px 14px;
        gap: 2px;
    }
    .mobile-nav-link {
        padding: 8px 0;
        font-size: 1rem;
    }
    .mobile-nav .btn {
        margin-top: 10px;
        min-height: 40px;
    }
    .mobile-menu-footer {
        padding: 10px 16px;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---- Admin mobile menu (slides from left) ---- */
.admin-mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    max-height: 100%;
    max-height: 100dvh;
    background-color: var(--white);
    z-index: 1001;
    transition: var(--transition-slow);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.admin-mobile-menu.active {
    left: 0;
}

.admin-mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.admin-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--stone-100);
}

.admin-mobile-menu-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--primary);
}

.admin-mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--stone-600);
    background: none;
    border: 0;
    cursor: pointer;
}

.admin-mobile-nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.admin-mobile-nav-link {
    display: block;
    padding: 12px 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--stone-700);
    border-bottom: 1px solid var(--stone-100);
}

.admin-mobile-nav-link:hover {
    color: var(--primary);
}

.admin-mobile-nav .btn {
    margin-top: 16px;
    flex-shrink: 0;
}

body.admin-menu-open {
    overflow: hidden;
}

@media (min-width: 1025px) {
    .admin-mobile-menu,
    #admin-nav-toggle {
        display: none !important;
    }
}

/* ---- Hero Section ---- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide img {
        animation: none;
    }
    .card:hover .card-image img,
    .card:hover,
    .btn-primary:hover,
    .btn-gold:hover {
        transform: none;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to right, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0) 80%),
        linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.2), rgba(0,0,0,0.5));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #f2d68a;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.85);
}

.hero-text {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 32px;
    max-width: 500px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.7);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.hero-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.hero-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.hero-nav.prev { left: 24px; }
.hero-nav.next { right: 24px; }

.hero-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 12px;
}
.hero .tbx-scroll-hint {
    bottom: 56px;
}
.hero:has(.hero-dots) .tbx-scroll-hint {
    bottom: 72px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    cursor: pointer;
    padding: 16px;
    background-clip: content-box;
    margin: -16px;
}

.hero-dot.active {
    width: 32px;
    border-radius: 6px;
    background-color: var(--gold);
}

@media (max-width: 768px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .hero-nav {
        display: none;
    }
}

/* ---- Page Hero (for inner pages) ---- */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 80px;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(95, 37, 95, 0.7), rgba(95, 37, 95, 0.5));
}

.page-hero-content {
    position: relative;
    z-index: 10;
}

.page-hero-subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-style: italic;
    color: var(--gold);
}

.page-hero-title {
    font-size: 3.5rem;
    color: var(--white);
    margin-top: 8px;
}

.page-hero-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 16px;
    max-width: 600px;
}

@media (max-width: 768px) {
    .page-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .page-hero-subtitle {
        font-size: 1.5rem;
    }
    
    .page-hero-title {
        font-size: 2.5rem;
    }
}

/* ---- Features Grid ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    background-color: var(--cream);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background-color: rgba(95, 37, 95, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 1.75rem;
    color: var(--primary);
}

.feature-title {
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-text {
    font-size: 0.875rem;
    color: var(--stone-500);
}

/* Compact fact strip (homepage) — facts without icon-card chrome */
.venue-facts {
    padding: 36px 0;
    border-bottom: 1px solid var(--stone-200);
    background: var(--white);
}

.venue-facts-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 40px;
    text-align: center;
}

.venue-fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.venue-fact-value {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--stone-900);
    letter-spacing: -0.01em;
}

.venue-fact-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--stone-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .venue-facts {
        padding: 28px 0;
    }
    .venue-facts-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 16px;
    }
}

/* ---- Cards ---- */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(95, 37, 95, 0.8), transparent);
}

.card-title {
    font-size: 1.5rem;
    color: var(--white);
}

/* Card title variant for normal (white) cards */
.card-title-dark {
    font-size: 1.5rem;
    color: var(--stone-900);
}

.card-body {
    padding: 24px;
}

/* Event Cards Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Gallery ---- */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 10px 24px;
    font-weight: 500;
    color: var(--stone-700);
    background-color: var(--white);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-info {
    color: var(--white);
}

.gallery-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-item-category {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: capitalize;
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--white);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .lightbox-prev { left: 16px; }
    .lightbox-next { right: 16px; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox-caption {
    text-align: center;
    color: var(--white);
    margin-top: 16px;
}

.lightbox-caption p {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.lightbox-caption span {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--stone-700);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius);
    background-color: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(95, 37, 95, 0.1);
}

.form-control::placeholder {
    color: var(--stone-400);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ---- Footer ---- */
.footer {
    background-color: var(--primary);
    color: var(--white);
}

.footer-reviews {
    padding: 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

.review-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.review-stars {
    margin-bottom: 16px;
}

.review-stars i {
    color: var(--gold);
    font-size: 1rem;
}

.review-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 20px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(197, 160, 89, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gold);
}

.review-name {
    display: block;
    font-weight: 600;
}

.review-event {
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-main {
    padding: 80px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 48px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    opacity: 0.8;
    margin-bottom: 24px;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--gold);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 24px;
    color: var(--white);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    opacity: 0.8;
    transition: var(--transition);
    color: var(--white);
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--gold);
}

.footer-contact ul li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-contact ul li i {
    color: var(--gold);
    margin-top: 4px;
}

.footer-contact ul li a {
    opacity: 0.8;
    transition: var(--transition);
    color: var(--white);
}

.footer-contact ul li a:hover {
    opacity: 1;
    color: var(--gold);
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 0.875rem;
    opacity: 0.7;
}

@media (max-width: 640px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ---- Back to Top ---- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-4px);
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.tab-btn {
    padding: 12px 24px;
    font-weight: 500;
    color: var(--stone-700);
    background-color: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---- Menu Items Grid ---- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--cream);
    border-radius: var(--radius);
}

.menu-item::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gold);
    flex-shrink: 0;
}

/* ---- Package Cards ---- */
.package-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 64px;
}

.package-section:nth-child(even) {
    direction: rtl;
}

.package-section:nth-child(even) > * {
    direction: ltr;
}

@media (max-width: 1024px) {
    .package-section,
    .package-section:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}

.package-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.package-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.package-icon {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.package-content {
    background-color: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.package-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.package-desc {
    color: var(--stone-600);
    margin-bottom: 24px;
    line-height: 1.7;
}

.package-features {
    margin-bottom: 24px;
}

.package-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.package-features li i {
    color: var(--gold);
    margin-top: 4px;
}

/* ---- Contact Page ---- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .contact-info-cards {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(95, 37, 95, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card-icon i {
    color: var(--primary);
    font-size: 1.25rem;
}

.contact-card-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-card-text {
    font-size: 0.875rem;
    color: var(--stone-600);
}

.contact-card-text a {
    color: var(--primary);
}

.contact-card-text a:hover {
    color: var(--primary-dark);
}

.contact-map {
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-form-card {
    background-color: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form-title {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.contact-form-text {
    color: var(--stone-600);
    margin-bottom: 24px;
}

/* ---- Account Page ---- */
.account-card {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.account-logo {
    text-align: center;
    margin-bottom: 24px;
}

.account-logo img {
    height: 60px;
    margin: 0 auto;
}

.account-intro {
    text-align: center;
    color: var(--stone-600);
    margin-bottom: 32px;
}

.account-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 32px;
}

.account-tab {
    padding: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius);
    background-color: var(--stone-100);
    color: var(--stone-600);
    transition: var(--transition);
}

.account-tab.active {
    background-color: var(--primary);
    color: var(--white);
}

.account-form-section {
    display: none;
}

.account-form-section.active {
    display: block;
}

.account-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--stone-400);
    font-size: 0.875rem;
}

.account-divider::before,
.account-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--stone-200);
}

.account-link {
    text-align: center;
    margin-top: 24px;
    color: var(--stone-600);
}

.account-link a {
    color: var(--primary);
    font-weight: 600;
}

/* ---- Account Dashboard (My Account - logged in) ---- */
.page-hero--compact {
    height: 26vh;
    min-height: 200px;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 900px) {
    .account-grid { grid-template-columns: 1fr; }
}

/* Make dashboard cards feel like clear sections */
.account-card--dashboard{
    padding: 24px;
    background: linear-gradient(180deg, var(--white), var(--stone-50));
    border: 1px solid var(--stone-200);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.card-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--stone-100);
}

.account-details {
    display: grid;
    gap: 10px;
}

.account-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    align-items: start;
}

@media (max-width: 700px) {
    .account-row { grid-template-columns: 1fr; }
}

.account-label {
    font-weight: 700;
    color: var(--stone-700);
}

.account-value {
    color: var(--stone-900);
}

.inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.card-actions {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.divider {
    border: none;
    border-top: 1px solid var(--stone-100);
    margin: 16px 0;
}

.subsection {
    margin-top: 14px;
}

/* Clear section headers */
.subsection-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--stone-100);
    border: 1px solid var(--stone-200);
    font-weight: 800;
    color: var(--stone-900);
    margin: 12px 0 10px;
}

/* Visible divider between upcoming and past */
.orders-separator{
    height: 1px;
    background: var(--stone-200);
    margin: 16px 0;
}

.orders-list {
    display: grid;
    gap: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--stone-100);
    border-radius: var(--radius);
    background: var(--white);
}

.order-item:hover {
    border-color: var(--stone-200);
    transform: translateY(-1px);
}

.order-title {
    font-weight: 800;
    color: var(--stone-900);
}

.order-sub {
    margin-top: 2px;
    color: var(--stone-600);
    font-weight: 600;
}

.order-status {
    display: flex;
    align-items: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: .85rem;
    border: 1px solid transparent;
}

.badge-success {
    background: rgba(34,197,94,.10);
    border-color: rgba(34,197,94,.25);
    color: var(--stone-900);
}

.badge-danger {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.25);
    color: var(--stone-900);
}

.badge-warn {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.25);
    color: var(--stone-900);
}

/* ---- Admin Gallery ---- */
.admin-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 20px 0;
    margin-top: 80px;
}

.admin-header h1 {
    color: var(--white);
    font-size: 1.5rem;
}

.admin-content {
    padding: 40px 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

@media (max-width: 1024px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-form-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.admin-form-title {
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--stone-100);
}

.file-upload {
    border: 2px dashed var(--stone-200);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary);
    background-color: rgba(95, 37, 95, 0.02);
}

.file-upload i {
    font-size: 3rem;
    color: var(--stone-300);
    margin-bottom: 16px;
}

.file-upload p {
    color: var(--stone-500);
}

.file-upload input {
    display: none;
}

.image-preview {
    margin-top: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    display: none;
}

.image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .admin-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.admin-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.admin-gallery-item:hover .admin-gallery-overlay {
    opacity: 1;
}

.admin-gallery-info {
    color: var(--white);
    margin-bottom: 12px;
}

.admin-gallery-info p {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.admin-gallery-info span {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: capitalize;
}

.admin-gallery-actions {
    display: flex;
    gap: 8px;
}

.admin-gallery-actions button {
    padding: 8px 16px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-edit {
    background-color: var(--gold);
    color: var(--white);
}

.btn-delete {
    background-color: #dc2626;
    color: var(--white);
}

/* ---- Utilities ---- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

/* ---- Mobile Responsive Fixes ---- */
@media (max-width: 768px) {
    /* Events grid on Events page - Why Choose Us section */
    .reviews-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Features grid on Catering page */
    .section > .container > div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Package section layout */
    .package-section {
        margin-bottom: 40px;
    }
    
    .package-content {
        padding: 24px;
    }
    
    /* Contact grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* Tabs on smaller screens */
    .tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Menu grid spacing */
    .menu-grid {
        gap: 12px;
    }
    
    .menu-item {
        padding: 12px;
    }
    
    /* Card padding adjustments */
    .card[style*="padding: 64px"] {
        padding: 32px 20px !important;
    }
    
    /* About image height */
    .about-image img {
        height: 300px !important;
    }
}

/* ---- Print Styles ---- */
@media print {
    .header,
    .footer,
    .back-to-top,
    .mobile-menu,
    .mobile-menu-overlay,
    .admin-mobile-menu {
        display: none !important;
    }
    
    .page-hero {
        height: auto;
        min-height: auto;
        margin-top: 0;
    }
    
    .section {
        padding: 30px 0;
    }
}

/* ---- Error States ---- */
.form-control.error,
input.error,
textarea.error,
select.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field-error {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #b91c1c;
    line-height: 1.4;
}

/* ---- Alerts / status messages (unified staff + public) ---- */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
}

.alert-success,
.alert-error,
.alert-info,
.alert-warn {
    position: relative;
    padding: 14px 16px 14px 44px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
}

.alert-success::before,
.alert-error::before,
.alert-info::before,
.alert-warn::before {
    position: absolute;
    left: 16px;
    top: 13px;
    font-weight: 700;
}

.alert-success { background-color: #d1fae5; color: #065F46; border: 1px solid #a7f3d0; }
.alert-error   { background-color: #fee2e2; color: #991B1B; border: 1px solid #fecaca; }
.alert-info    { background-color: var(--primary-soft); color: var(--primary-dark); border: 1px solid #e6d3e6; }
.alert-warn    { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.alert-success::before { content: "\2714"; color: #059669; }
.alert-error::before   { content: "\26A0"; color: #dc2626; }
.alert-warn::before    { content: "\26A0"; color: #b45309; }
.alert-info::before    { content: "\2139"; color: var(--primary); }

/* ---- Loading State ---- */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}





/* ======================================================
   LEGACY TABLE SUPPORT (merged from old CSS)
   Safe additive styles – does NOT override new layout
   ====================================================== */

/* Base table */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  font-family: OpenSans-Regular, Arial, sans-serif;
}

/* Do NOT set a fixed height here — it clamps mobile card-style rows
   (border-radius + overflow) into unreadable oval slivers. */
table tbody tr {
  vertical-align: middle;
}

/* Header cells */
.tableheader {
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  color: #ffffff;
  background: #5F255F;
  border: 0;
  padding: 6px 8px;
}

/* Default table cell */
td {
  font-size: 15px;
  color: #ffffff;
  background: #00a3c9;
  padding: 6px 8px;
}

/* Cell variants */
.tabletd {
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
  background: #00b2dc;
}

.tabletd2 {
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
  background: #00a3c9;
}

.tabletd3 {
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
  background: #c80000;
}

.tabletd4 {
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
  background: darkgreen;
}

/* Optional table container background */
.tablebg {
  background: #FCE3FF;
  border: 1px solid #9F00FF;
  box-shadow: 2px 1px 5px #5700FF;
  padding: 5px;
}

/* ======================================================
   PRINT SUPPORT (table-focused only)
   ====================================================== */

@media print {

  /* Keep legacy dense print rows compact without clipping modern cards */
  table tbody tr:has(> .tabletd),
  table tbody tr:has(> .tabletd2),
  table tbody tr:has(> .tableheader) {
    height: 18px;
  }

  th,
  .tableheader {
    height: 18px;
  }

  td {
    font-size: 13px !important;
    font-weight: bold !important;
  }

  .tabletd,
  .tabletd2,
  .tabletd3,
  .tabletd4 {
    background-color: #ffffff !important;
    color: #5d0400 !important;
  }
}

.aone{
width:50%;
}

.aonebig{
width:60%;
}

.asecond{
float:left !important;
width:47% !important;
}
.asecondgap{
float:left !important;
width:2% !important;
}

@media print and (color) {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


/* ======================================================
   MY ACCOUNT DASHBOARD (Logged-in page panels)
   Strong card background + overrides account-card max-width
   ====================================================== */

.account-card--dashboard{
    /* override the login card sizing rules */
    max-width: none !important;
    margin: 0 !important;

    /* strong visible panel */
    background: var(--white) !important;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
    padding: 0 !important; /* we’ll pad inside header/body for cleaner look */
    overflow: hidden;
}

.account-panel-header{
    padding: 18px 20px;
    background: var(--white);
    border-bottom: 2px solid var(--gold);
}

.account-panel-title{
    font-family: var(--font-body, 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #5F255F;
    margin: 0;
}

.account-panel-body{
    padding: 18px;
}

/* Make the two panels clearly separate and spaced */
.account-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

@media (max-width: 900px){
    .account-grid{ grid-template-columns: 1fr; }
}

/* Admin dashboard: Operations | Tools & people / My Orders | Account Details */
.account-grid--2x2{ align-items: start; }
.account-grid--2x2 > .account-card{ margin-bottom: 0 !important; }
.account-grid--2x2 > .grid-admin{ order: 1; }
.account-grid--2x2 > .grid-staff{ order: 2; }
.account-grid--2x2 > .grid-orders{ order: 3; }
.account-grid--2x2 > .grid-account{ order: 4; }

.account-panel-subtitle{
  margin: 6px 0 10px;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a6570;
}

/* Extra-strong section split between upcoming/past */
.orders-separator{
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--gold),
        transparent
    );
    margin: 24px 0;
}

/* Slightly stronger order row card */
.order-item{
    background: var(--white);
    border: 1px solid var(--stone-200);
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

.order-item:hover{
    border-color: var(--stone-300);
    box-shadow: 0 10px 22px rgba(0,0,0,0.07);
}

.account-card--dashboard{
    position: relative;
}

.account-card--dashboard::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold);
}


/* ================================
   MY ACCOUNT – warmer, less dull
   (override at bottom of CSS)
   ================================ */

/* Make the main area feel warmer (not grey) */
.section.bg-cream{
  background: var(--cream) !important;
}

/* Remove any “grey panel” look from dashboard cards */
.account-card--dashboard{
  background: var(--white) !important;
  border: 1px solid rgba(197,160,89,0.35) !important; /* soft gold tint */
  box-shadow: 0 14px 40px rgba(0,0,0,0.08) !important;
}

/* Keep the gold underline (good) but ensure header is white */
.account-panel-header{
  background: var(--white) !important;
  border-bottom: 2px solid var(--gold) !important;
}

/* REMOVE the vertical gold strip if it exists */
.account-card--dashboard::before{
  display: none !important;
  content: none !important;
}

/* Upcoming/Past headings: remove grey bars, use clean text + gold underline */
.subsection-title{
  background: transparent !important;
  border: none !important;
  padding: 10px 0 !important;
  font-weight: 800;
  color: var(--stone-900);
  border-bottom: 1px solid rgba(197,160,89,0.55) !important;
  border-radius: 0 !important;
  margin: 16px 0 12px !important;
}

/* Divider between upcoming and past: thin gold fade (not grey slab) */
.orders-separator{
  height: 1px !important;
  background: linear-gradient(to right, transparent, var(--gold), transparent) !important;
  border: none !important;
  margin: 20px 0 !important;
}

/* Optional: slightly warmer order row backgrounds so it doesn’t feel clinical */
.order-item{
  background: #FFFEFC !important; /* tiny warm white */
  border: 1px solid rgba(0,0,0,0.06) !important;
}
.order-item:hover{
  border-color: rgba(197,160,89,0.35) !important;
}

/* ======================================================
   MY ACCOUNT – central white shell + compact brand hero
   Gives the content a defined white column on wide screens
   and replaces the plain serif page heading.
   ====================================================== */

/* Clear the fixed 90px site header. Default .section padding
   (80px / 50px mobile) leaves the hero tucked under the nav. */
.section.account-page{
  padding-top: 90px;
}

.account-shell{
  background: var(--white);
  border: 1px solid rgba(197,160,89,0.30);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(45,20,45,0.10);
  padding: 26px;
}

@media (max-width: 640px){
  .account-shell{ padding: 5px; border-radius: 16px; }
}

/* Compact brand hero (replaces the serif "My account" heading) */
.account-hero{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 24px 26px;
  margin: 0 0 24px;
  background: linear-gradient(135deg, #5F255F 0%, #7A3A7A 62%, #9A4E96 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(95,37,95,0.26);
}

.account-hero-text{ position: relative; z-index: 1; }

.account-hero-eyebrow{
  display: block;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #C5A059);
  margin-bottom: 7px;
}

.account-hero-title{
  margin: 0;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
}

.account-hero-sub{
  margin: 7px 0 0;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.82);
}

@media (max-width: 640px){
  .account-hero{ padding: 18px 18px; border-radius: 14px; margin-bottom: 18px; }
  .account-hero-title{ font-size: 1.5rem; }
}

/* Admin: checklist glimpse — clean toggle overview / categories / items */
.account-checklist-hero-wrap{
  margin: 0 0 20px;
}
.account-checklist-hero-wrap .account-hero--checklist{
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  text-align: left;
  font: inherit;
  display: block;
  padding: 16px 16px 14px;
  cursor: default;
  color: #fff;
}
.account-hero--checklist.is-ready{
  background: linear-gradient(135deg, #4a6b3a 0%, #5F255F 55%, #7A3A7A 100%);
}
.account-cl-view[hidden]{ display: none !important; }

.account-cl-overview-hit{
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.account-cl-overview-hit .account-hero-text{
  flex: 1 1 auto;
  min-width: 0;
}
.account-cl-overview-hit .account-hero-eyebrow{
  margin-bottom: 4px;
}
.account-cl-overview-hit .account-hero-title{
  display: block;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}
.account-cl-overview-hit .account-hero-sub{
  display: block;
  margin: 3px 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(255,255,255,0.78);
}
.account-cl-chevron{
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}
.account-cl-view--overview > .account-cl-full-link{
  display: inline-block;
  margin-top: 12px;
}

.account-hero-checklist-ring{
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
}
.account-hero-checklist-ring.checklist-progress-ring{
  background: conic-gradient(#C5A059 calc(var(--progress) * 1%), rgba(255,255,255,0.2) 0) !important;
}
.account-hero-checklist-ring.checklist-progress-ring::before{
  background: #5F255F !important;
  inset: 5px !important;
}
.account-hero-checklist-ring.checklist-progress-ring > span{
  color: #fff !important;
  font-size: .68rem !important;
  font-weight: 800 !important;
}
.account-hero-checklist-ring.checklist-progress-ring.is-complete{
  background: #2f9a72 !important;
}
.account-hero-checklist-ring.checklist-progress-ring.is-complete::before{
  display: none !important;
}

.account-cl-full-link{
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.78rem;
  font-weight: 650;
  color: rgba(232,213,163,0.9);
  text-decoration: none;
}
.account-cl-full-link:hover,
.account-cl-full-link:focus-visible{
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-cl-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.account-cl-back{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.account-cl-back:hover,
.account-cl-back:focus-visible{
  color: #fff;
  outline: none;
}
.account-cl-items-title{
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.88rem;
  font-weight: 750;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-cl-cats{
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 14px;
  width: 100%;
}
.account-cl-cat{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  width: calc(100% / var(--cl-per-row, 6));
  max-width: calc(100% / var(--cl-per-row, 6));
  min-width: 0;
  margin: 0;
  padding: 2px 2px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: center;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.account-cl-cat:hover,
.account-cl-cat:focus-visible{
  background: rgba(255,255,255,0.08);
  outline: none;
}
.account-cl-cat-ring{
  width: 46px !important;
  height: 46px !important;
}
.account-cl-cat-ring.checklist-progress-ring{
  background: conic-gradient(#C5A059 calc(var(--progress) * 1%), rgba(255,255,255,0.22) 0) !important;
}
.account-cl-cat-ring.checklist-progress-ring::before{
  background: #5F255F !important;
  inset: 4px !important;
}
.account-cl-cat-ring.checklist-progress-ring > span{
  color: #fff !important;
  font-size: .52rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
.account-cl-cat-ring.checklist-progress-ring.is-complete{
  background: #2f9a72 !important;
}
.account-cl-cat-ring.checklist-progress-ring.is-complete::before{
  display: none !important;
  content: none !important;
}
.account-cl-cat-ring.checklist-progress-ring.is-complete > span{
  color: #fff !important;
  font-size: .5rem !important;
}
.account-cl-cat-name{
  display: block;
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.2;
  color: rgba(255,255,255,0.88);
}

.account-cl-view--items .account-cl-full-link{
  margin-top: 12px;
}
.account-cl-items-list{
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 260px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.account-cl-item{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.86rem;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
}
.account-cl-item:last-child{ border-bottom: none; }
.account-cl-item-mark{
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.6rem;
  box-sizing: border-box;
}
.account-cl-item.is-done .account-cl-item-mark{
  background: #2f9a72;
  color: #fff;
}
.account-cl-item.is-open .account-cl-item-mark{
  border: 1.5px solid rgba(255,255,255,0.35);
}
.account-cl-item-body{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.account-cl-item.is-done .account-cl-item-name{
  color: rgba(255,255,255,0.55);
}
.account-cl-item em{
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(197,160,89,0.9);
}
.account-cl-item.is-empty{
  color: rgba(255,255,255,0.65);
  justify-content: center;
  border: 0;
}

@media (max-width: 640px){
  .account-checklist-hero-wrap{ margin-bottom: 16px; }
  .account-checklist-hero-wrap .account-hero--checklist{ padding: 14px 12px 12px; }
  .account-cl-overview-hit{ gap: 12px; }
  .account-cl-overview-hit .account-hero-title{ font-size: 1.08rem; }
  .account-hero-checklist-ring{
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
  }
  .account-cl-cat-ring{
    width: 42px !important;
    height: 42px !important;
  }
  .account-cl-cat-name{ font-size: 0.62rem; }
  .account-cl-cats{ row-gap: 12px; }
  .account-cl-items-list{ max-height: 220px; }
}

.account-hero--checklist.is-signed{
  background: linear-gradient(135deg, #2f6b52 0%, #5F255F 100%);
}
.account-cl-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
}
.account-cl-actions .account-cl-full-link{
  margin-top: 0;
}
.account-cl-photos-btn{
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(232,213,163,0.45);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #f3e6c0 !important;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.account-cl-photos-btn:hover,
.account-cl-photos-btn:focus-visible{
  background: rgba(255,255,255,0.14);
  color: #fff !important;
  outline: none;
}
.account-cl-photos-btn .cl-photos-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  font-size: 0.72rem;
  font-weight: 800;
}

/* Checklist photo gallery lightbox */
html.cl-gallery-open,
body.cl-gallery-open{
  overflow: hidden !important;
  overflow-x: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
.cl-gallery-modal[hidden]{ display: none !important; }
.cl-gallery-modal{
  --cl-gallery-accent: #dcc7a0;
  --cl-gallery-select: #0a84ff;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #050505;
  opacity: 0;
  transition: opacity .22s ease;
  overscroll-behavior: none;
  overflow: hidden;
  touch-action: manipulation;
  contain: layout paint;
  /* Keep modal pinned to the layout viewport on iOS focus/scroll quirks */
  transform: translateZ(0);
}
/* Neutralize page-level `button` padding/min-height leaking into chrome */
.cl-gallery-modal .cl-gallery-close,
.cl-gallery-modal .cl-gallery-share,
.cl-gallery-modal .cl-gallery-back,
.cl-gallery-modal .cl-gallery-select-cancel,
.cl-gallery-modal .cl-gallery-cat-nav,
.cl-gallery-modal .cl-gallery-nav,
.cl-gallery-modal .cl-gallery-tick,
.cl-gallery-modal .cl-gallery-thumb,
.cl-gallery-modal .cl-gallery-grid-item{
  min-height: 0;
  max-width: none;
  padding: 0;
  box-shadow: none;
}
.cl-gallery-modal .cl-gallery-share-go,
.cl-gallery-modal .cl-gallery-select-clear{
  min-height: 0;
  max-width: none;
  box-shadow: none;
}
.cl-gallery-modal.is-open{ opacity: 1; }
.cl-gallery-modal.is-closing{ opacity: 0; }
.cl-gallery-shell{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.cl-gallery-top{
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px 8px;
  text-align: center;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .28s cubic-bezier(0.22, 1, 0.36, 1), opacity .22s ease;
}
.cl-gallery-bottom{
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 12px max(14px, env(safe-area-inset-bottom, 0px));
  text-align: center;
  overflow: visible;
  transform: translateY(14px);
  opacity: 0;
  transition: transform .28s cubic-bezier(0.22, 1, 0.36, 1), opacity .22s ease;
}
.cl-gallery-modal.is-open .cl-gallery-top,
.cl-gallery-modal.is-open .cl-gallery-bottom{
  transform: none;
  opacity: 1;
}
.cl-gallery-modal.is-closing .cl-gallery-top{
  transform: translateY(-10px);
  opacity: 0;
}
.cl-gallery-modal.is-closing .cl-gallery-bottom{
  transform: translateY(12px);
  opacity: 0;
}
.cl-gallery-toolbar{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.cl-gallery-left-actions{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 42px;
}
.cl-gallery-close,
.cl-gallery-share,
.cl-gallery-back,
.cl-gallery-select-cancel{
  position: static;
  z-index: 2;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.cl-gallery-share,
.cl-gallery-back,
.cl-gallery-select-cancel{ position: relative; }
.cl-gallery-share[hidden],
.cl-gallery-back[hidden],
.cl-gallery-select-cancel[hidden]{ display: none !important; }
.cl-gallery-share.is-busy,
.cl-gallery-share-go.is-busy{
  opacity: 0.55;
  pointer-events: none;
}
.cl-gallery-share .fa-share-nodes,
.cl-gallery-share .fa-arrow-up-from-bracket{
  display: block;
  font-size: 0.92rem;
  line-height: 1;
  width: 1em;
  text-align: center;
}
.cl-gallery-share.is-active-share{
  background: var(--cl-gallery-select);
  color: #fff;
}
.cl-gallery-share-badge{
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1.15em;
  height: 1.15em;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--cl-gallery-select);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15em;
  text-align: center;
}
.cl-gallery-share-badge[hidden]{ display: none !important; }
.cl-gallery-cat-selector{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
}
.cl-gallery-cat-label{
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}
.cl-gallery-cat-label strong{
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-gallery-cat-label span{
  display: block;
  color: rgba(255,255,255,0.62);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
}
.cl-gallery-cat-nav{
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.cl-gallery-cat-nav[hidden],
.cl-gallery-nav[hidden]{ display: none !important; }
.cl-gallery-cat-tags{
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  padding: 0 2px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.cl-gallery-cat-tags::-webkit-scrollbar{ display: none; }
.cl-gallery-cat-tags[hidden]{ display: none !important; }
.cl-gallery-cat-tag{
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease;
  transform-origin: center center;
}
.cl-gallery-cat-tag.is-all{
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0a0a0a;
  letter-spacing: 0.02em;
  box-shadow: 10px 0 14px 2px #0a0a0a;
}
.cl-gallery-cat-tag.is-all.is-active{
  background: var(--cl-gallery-accent);
  box-shadow: 10px 0 14px 2px #0a0a0a;
}
.cl-gallery-cat-tag.is-active{
  background: var(--cl-gallery-accent);
  color: #1a1410;
  transform: none;
}
.cl-gallery-stage{
  position: relative;
  z-index: 1;
  min-height: 0;
  height: 100%;
  display: block;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
}
.cl-gallery-modal.is-grid .cl-gallery-stage{
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding: 0 12px 8px;
}
.cl-gallery-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 2px 0 8px;
  box-sizing: border-box;
}
.cl-gallery-grid[hidden]{ display: none !important; }
.cl-gallery-grid-item{
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, transform .15s ease;
}
.cl-gallery-grid-item img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.cl-gallery-grid-item:active{ transform: scale(0.98); }
.cl-gallery-grid-cat{
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.92);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.cl-gallery-grid-time{
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  max-width: calc(100% - 12px);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.cl-gallery-grid-check{
  position: absolute;
  top: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.18);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  pointer-events: none;
}
.cl-gallery-grid-item.is-selected{
  border-color: transparent;
}
.cl-gallery-grid-item.is-selected .cl-gallery-grid-check{
  background: var(--cl-gallery-select);
  border-color: var(--cl-gallery-select);
  color: #fff;
}
.cl-gallery-share-bar{
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 2px 4px;
  box-sizing: border-box;
  overflow: visible;
}
.cl-gallery-share-bar[hidden]{ display: none !important; }
.cl-gallery-select-clear{
  justify-self: start;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cl-gallery-select-clear:disabled{
  opacity: 0.4;
  cursor: default;
}
.cl-gallery-select-count{
  justify-self: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.cl-gallery-share-go{
  justify-self: end;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--cl-gallery-select);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cl-gallery-share-go i{
  display: block;
  font-size: 0.9rem;
  line-height: 1;
}
.cl-gallery-share-go:disabled{
  opacity: 0.4;
  cursor: default;
}
.cl-gallery-modal .cl-gallery-select-clear{
  min-height: 44px;
  padding: 0 8px;
}
.cl-gallery-modal .cl-gallery-share-go{
  min-height: 44px;
  height: 44px;
  padding: 0 20px;
}
@media (min-width: 720px){
  .cl-gallery-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (min-width: 1100px){
  .cl-gallery-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 980px;
    margin: 0 auto;
  }
}
.cl-gallery-frame{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  padding: 8px 52px;
  overflow: hidden;
  /* Never transform this node — zoom/pan lives on .cl-gallery-zoom */
  transform: none !important;
}
.cl-gallery-frame[hidden]{ display: none !important; }
.cl-gallery-zoom{
  /* Fill the frame so img max-height:100% has a definite containing block */
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  transform-origin: center center;
  will-change: transform;
}
.cl-gallery-zoom.is-animating{ transition: transform .18s ease; }
.cl-gallery-img{
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: none;
  pointer-events: none;
  background: transparent;
  -webkit-user-drag: none;
  will-change: transform, opacity;
}
.cl-gallery-img.is-slide{
  transition: transform .22s cubic-bezier(0.22, 1, 0.36, 1), opacity .18s ease;
}
.cl-gallery-img.is-out-next{
  opacity: 0.35;
  transform: translate3d(-22%, 0, 0);
}
.cl-gallery-img.is-out-prev{
  opacity: 0.35;
  transform: translate3d(22%, 0, 0);
}
.cl-gallery-img.is-prep-next{
  opacity: 0;
  transform: translate3d(18%, 0, 0);
}
.cl-gallery-img.is-prep-prev{
  opacity: 0;
  transform: translate3d(-18%, 0, 0);
}
.cl-gallery-img.is-out{
  opacity: 0;
  transform: translate3d(0, 0, 0);
}
/* Must come after prep/out so is-in wins when both are briefly present */
.cl-gallery-img.is-in{
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.cl-gallery-empty{
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  color: rgba(255,255,255,0.72);
  font-size: 0.95rem;
  text-align: center;
}
.cl-gallery-empty[hidden]{ display: none !important; }
.cl-gallery-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.cl-gallery-prev{ left: max(6px, env(safe-area-inset-left, 0px)); }
.cl-gallery-next{ right: max(6px, env(safe-area-inset-right, 0px)); }
.cl-gallery-tick{
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255,255,255,0.95);
  border-radius: 50%;
  background: rgba(0,0,0,0.28);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
  color: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.cl-gallery-tick[hidden]{ display: none !important; }
.cl-gallery-tick.is-selected{
  background: var(--cl-gallery-select);
  border-color: var(--cl-gallery-select);
  color: #fff;
}
.cl-gallery-tick:active{ transform: scale(0.94); }
.cl-gallery-counter{
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
}
.cl-gallery-caption{
  max-width: 90%;
  margin: 0 auto;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-gallery-caption[hidden]{ display: none !important; }
.cl-gallery-thumbs{
  display: flex;
  justify-content: flex-start;
  justify-content: safe center;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.cl-gallery-thumbs::-webkit-scrollbar{ display: none; }
.cl-gallery-thumbs[hidden]{ display: none !important; }
.cl-gallery-thumb{
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 2.5px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  opacity: 0.78;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, opacity .18s ease, border-color .18s ease;
}
.cl-gallery-thumb.is-active,
.cl-gallery-thumb.is-selected{
  border-color: var(--cl-gallery-accent);
  opacity: 1;
  /* Avoid scale — expands scrollWidth and can shift the modal on mobile WebKit */
  transform: none;
}
.cl-gallery-thumb-check{
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cl-gallery-select);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  pointer-events: none;
}
.cl-gallery-thumb img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.cl-gallery-modal.is-zoomed .cl-gallery-nav,
.cl-gallery-modal.is-zoomed .cl-gallery-cat-tags,
.cl-gallery-modal.is-zoomed .cl-gallery-cat-selector,
.cl-gallery-modal.is-zoomed .cl-gallery-bottom{
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.cl-gallery-modal.is-zoomed .cl-gallery-top{
  opacity: 1;
  pointer-events: none;
  transform: none;
}
.cl-gallery-modal.is-zoomed .cl-gallery-close,
.cl-gallery-modal.is-zoomed .cl-gallery-share,
.cl-gallery-modal.is-zoomed .cl-gallery-back,
.cl-gallery-modal.is-zoomed .cl-gallery-tick{
  pointer-events: auto;
  background: rgba(255,255,255,0.18);
}
.cl-gallery-modal.is-zoomed .cl-gallery-tick.is-selected{
  background: var(--cl-gallery-select);
  color: #fff;
}
@media (max-width: 640px){
  .cl-gallery-top{
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top, 0px)) 10px 6px;
  }
  .cl-gallery-toolbar{
    grid-template-columns: auto minmax(0, 1fr) 40px;
    gap: 6px;
  }
  .cl-gallery-close,
  .cl-gallery-share,
  .cl-gallery-back,
  .cl-gallery-select-cancel{
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    font-size: 1.05rem;
  }
  .cl-gallery-share.is-active-share{
    background: var(--cl-gallery-select);
    color: #fff;
  }
  .cl-gallery-modal.is-grid .cl-gallery-stage{
    padding: 0 8px 6px;
  }
  .cl-gallery-grid{
    gap: 8px;
  }
  .cl-gallery-grid-item{
    border-radius: 10px;
  }
  .cl-gallery-share-go{
    min-height: 42px;
    height: 42px;
    padding: 0 18px;
    font-size: 0.9rem;
  }
  .cl-gallery-modal .cl-gallery-share-go{
    min-height: 42px;
    height: 42px;
    padding: 0 18px;
  }
  .cl-gallery-select-clear,
  .cl-gallery-select-count{
    font-size: 0.9rem;
  }
  .cl-gallery-cat-selector{
    padding: 4px 6px;
  }
  .cl-gallery-cat-label strong{ font-size: 0.9rem; }
  .cl-gallery-cat-label span{ font-size: 0.64rem; }
  .cl-gallery-cat-nav{
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.08);
  }
  .cl-gallery-cat-tag{
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.74rem;
  }
  .cl-gallery-stage{
    padding: 0;
  }
  .cl-gallery-frame{
    /* Side arrows are small / swipe-first — keep photo fully inside stage */
    padding: 6px 12px;
  }
  .cl-gallery-img{
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
  }
  .cl-gallery-nav{
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.55);
  }
  .cl-gallery-prev{ left: 2px; }
  .cl-gallery-next{ right: 2px; }
  .cl-gallery-bottom{
    gap: 6px;
    padding: 6px 10px max(12px, env(safe-area-inset-bottom, 0px));
  }
  .cl-gallery-counter{ font-size: 0.82rem; }
  .cl-gallery-caption{
    font-size: 0.7rem;
    max-width: 96%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    line-height: 1.3;
  }
  .cl-gallery-thumb{
    width: 44px;
    height: 44px;
    border-radius: 9px;
  }
  .account-cl-actions{ margin-top: 10px; }
}


/* ======================================================
   GLOBAL APP SHELL – central white column for logged-in
   pages that render inside <main id="main-content">.
   Enabled per page with:  $app_shell = 1;  before top.php
   ====================================================== */
.app-shell{
  max-width: var(--container-width);
  margin: 90px auto 48px;
  background: var(--white);
  border: 1px solid rgba(197,160,89,0.30);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(45,20,45,0.10);
  padding: 28px 30px;
}

/* Inner containers shouldn't re-constrain or double-pad inside the shell */
.app-shell > .container,
.app-shell > .section > .container,
.app-shell .container{
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.app-shell > .section{ padding-top: 0; padding-bottom: 0; }

/* Inner full-page section tints would fight the white shell — drop them */
.app-shell .section.bg-cream,
.app-shell .bg-cream{ background: transparent !important; }

@media (max-width: 768px){
  /* ~60% less side gutter than previous 12px margin + 16px padding */
  .app-shell{
    margin: 90px 0 28px;
    padding: 10px 6px;
  }

  /* Same tighter gutters for pages with their own shell */
  .gm-wrap,
  .rvadm-wrap,
  .an-page,
  .stats-page,
  .feedback-page,
  .cal-page,
  .stf-page,
  .pl-wrap,
  .pnl-wrap,
  .ae-page,
  .training-app,
  .training-shell,
  .od-page{
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* Flat central white column (not a floating card): no border/radius/shadow.
   !important so it also flattens the per-page wrapper styles defined inline. */
.app-shell,
.account-shell,
.gm-wrap,
.rvadm-wrap,
.an-page,
.aa-page,
.stats-page,
.feedback-page,
.cal-page,
.stf-page,
.pl-wrap,
.pnl-wrap,
.ae-page,
.od-page,
.training-app,
.training-shell,
.shift-app,
.staff-shifts-page{
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Staff / account chrome: Manrope only — Fraunces is for marketing display */
.app-shell h1, .app-shell h2, .app-shell h3, .app-shell h4,
.account-shell h1, .account-shell h2, .account-shell h3, .account-shell h4,
.gm-wrap h1, .gm-wrap h2, .gm-wrap h3, .gm-wrap h4,
.rvadm-wrap h1, .rvadm-wrap h2, .rvadm-wrap h3, .rvadm-wrap h4,
.an-page h1, .an-page h2, .an-page h3, .an-page h4,
.aa-page h1, .aa-page h2, .aa-page h3, .aa-page h4,
.stats-page h1, .stats-page h2, .stats-page h3, .stats-page h4,
.feedback-page h1, .feedback-page h2, .feedback-page h3, .feedback-page h4,
.cal-page h1, .cal-page h2, .cal-page h3, .cal-page h4,
.stf-page h1, .stf-page h2, .stf-page h3, .stf-page h4,
.pl-wrap h1, .pl-wrap h2, .pl-wrap h3, .pl-wrap h4,
.pnl-wrap h1, .pnl-wrap h2, .pnl-wrap h3, .pnl-wrap h4,
.ae-page h1, .ae-page h2, .ae-page h3, .ae-page h4,
.od-page h1, .od-page h2, .od-page h3, .od-page h4,
.training-app h1, .training-app h2, .training-app h3, .training-app h4,
.training-shell h1, .training-shell h2, .training-shell h3, .training-shell h4,
.shift-app h1, .shift-app h2, .shift-app h3, .shift-app h4,
.staff-shifts-page h1, .staff-shifts-page h2, .staff-shifts-page h3, .staff-shifts-page h4,
.tool-header,
.training-intro h1,
.training-hero h1,
.shifts-page-intro h1,
.shifts-section-heading h2,
.stf-page-title,
.gm-title,
.rvadm-title,
.rvadm-card h2,
.aa-head h1,
.aa-modal-head h2,
.fb-title,
.fb-success h2 {
  font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
  letter-spacing: 0;
}

/* White column starts flush under the fixed 90px header (no cream gap) */
.gm-wrap,
.rvadm-wrap,
.an-page,
.stats-page,
.feedback-page,
.cal-page,
.stf-page,
.pl-wrap,
.pnl-wrap{
  margin-top: 90px !important;
}
@media (max-width: 768px){
  .gm-wrap,
  .rvadm-wrap,
  .an-page,
  .stats-page,
  .feedback-page,
  .cal-page,
  .stf-page,
  .pl-wrap,
  .pnl-wrap{
    margin-top: 82px !important;
  }
}






/* ============================================================
   MODERN DASHBOARD STYLES (Admin Area)
   ============================================================ */

/* 1. Main Grid Layout */
.admin-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 30px;
}
@media (max-width: 900px) {
    .admin-grid-layout { grid-template-columns: 1fr; }
}

/* 2. The Clean White Card */
.dashboard-card {
    background: #fff;
    border: 1px solid #e4dae6;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(45, 20, 45, 0.07);
    padding: 0; /* padding handled by inner elements */
    overflow: hidden;
    margin-bottom: 24px;
}

/* Card Header — clean white strip, brand title, subtle neutral hairline */
.dashboard-card-header {
    background: #fff;
    padding: 16px 20px;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #5F255F;
    border-bottom: 1px solid #eef0f2;
}

/* Card Body */
.dashboard-card-body {
    padding: 20px;
}

/* 3. Modern Inputs & Buttons */
.modern-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #111;
    background: #fff;
    box-sizing: border-box;
}
.modern-input:focus {
    outline: none;
    border-color: #5F255F;
    box-shadow: 0 0 0 3px rgba(95, 37, 95, 0.1);
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #5F255F;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}
.btn-modern:hover {
    background-color: #4C1E4C;
    color: #fff;
}

/* 4. Modern Table (Replaces the blue legacy table) */
.modern-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    min-width: 600px;
}

/* Header Row */
.modern-table td.modern-th {
    background-color: #5F255F !important;
    color: #fff !important;
    font-weight: 700;
    padding: 14px 16px;
    border: none;
    font-size: 1rem;
}
.modern-table td.modern-th a { color: #fff; text-decoration: none; }

/* Body Rows */
.modern-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    background: #fff; /* White background */
    font-size: 0.95rem;
    vertical-align: middle;
}
.modern-table tr:hover td {
    background-color: #f9fafb; /* Light hover effect */
}

/* Links inside table */
.modern-table a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
}
.modern-table a:hover {
    color: #5F255F;
    text-decoration: underline;
}

/* Button-style links inside tables must keep their own (white) text.
   Without this, the generic ".modern-table a { color:#111 }" rule wins on
   specificity and renders these as purple buttons with black text. */
.modern-table a.btn-modern,
.modern-table a.btn-view,
.modern-table a.btn-view-small {
    color: #fff;
}
.modern-table a.btn-modern:hover,
.modern-table a.btn-view:hover,
.modern-table a.btn-view-small:hover {
    color: #fff;
    text-decoration: none;
}

/* Status Dots (Kept exactly as you had them) */
.dot { height: 12px; width: 12px; border-radius: 50%; display: inline-block; margin-left: 4px; }
.dot-gray { background-color: #bbb; }
.dot-yellow { background-color: yellow; }
.dot-purple { background-color: #7300ff; }
.dot-green { background-color: green; }

/* Form Layout Table (Invisible structure) */
.form-layout-table { width: 100%; border-collapse: collapse; background: transparent; }
.form-layout-table td { padding: 8px 0; border: none; background: transparent; color: #111; font-weight: 600; }
.form-layout-table td:first-child { width: 130px; }

/* Autocomplete List — elevated so it isn't clipped */
.ac-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 200;
    margin-top: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    max-height: 320px;
    overflow-y: auto;
}
.ac-list.is-open { display: block; }
.ve-search-wrap { position: relative; z-index: 80; overflow: visible; }
.ve-search-card { overflow: visible !important; }
.ve-search-card .taiba-card-body { overflow: visible !important; }
.ac-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    text-align: left;
    width: 100%;
    background: #fff;
    border-left: none;
    border-right: none;
    border-top: none;
    font-family: inherit;
    color: #111;
}
.ac-item:hover { background-color: #f9fafb; }
.ac-item b, .ac-item strong { display: block; font-size: 0.9rem; }
.ac-item small, .ac-item span.ac-sub {
    display: block;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
    font-weight: 500;
}

/* Two-column search results (Orders | Accounts) */
.ve-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 16px 0 20px;
}
.ve-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #efe9ef;
}
.ve-result-row:last-child { border-bottom: none; }
.ve-result-meta { min-width: 0; flex: 1; }
.ve-result-meta strong { display: block; font-size: 0.92rem; color: #2d1f2d; }
.ve-result-meta span { display: block; font-size: 0.8rem; color: #7a6570; margin-top: 2px; line-height: 1.4; }
.ve-account-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #4a1c4a;
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.ve-account-banner .ve-ab-label {
    color: var(--gold, #C5A059);
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ve-account-banner .ve-ab-name { font-size: 1.15rem; font-weight: 800; margin: 2px 0; }
.ve-account-banner .ve-ab-sub { font-size: 0.85rem; opacity: 0.9; }
.ve-account-banner .ve-ab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}
/* Explicit chrome so actions never collapse to plain white text on the purple banner */
.ve-account-banner .ve-ab-actions a,
.ve-account-banner .ve-ab-actions .taiba-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px !important;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    box-sizing: border-box;
    color: #fff !important;
}
.ve-account-banner .ve-ab-actions .taiba-button-gold,
.ve-account-banner .ve-ab-actions a.taiba-button-gold {
    background: #C5A059 !important;
    border-color: #C5A059 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.35);
}
.ve-account-banner .ve-ab-actions .taiba-button-ghost-light,
.ve-account-banner .ve-ab-actions a.taiba-button-ghost-light {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.75) !important;
    color: #fff !important;
    box-shadow: none;
}
.ve-results-grid .taiba-button-primary,
.ve-results-grid .js-start-order {
    color: #fff !important;
}
.ve-empty-actions {
    margin-top: 10px;
}
.ve-search-card {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}
.ve-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}
.ve-search-row .form-control,
.ve-search-row input[type="text"] {
    flex: 1;
    min-width: 200px;
}
.ve-skip-start {
    margin-top: 8px;
}
.ve-card-pad {
    padding: 14px 16px 4px;
}
.ve-ab-actions-gap {
    display: flex;
    gap: 10px;
}
@media (max-width: 800px) {
    .ve-results-grid { grid-template-columns: 1fr; }
    .ve-account-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px 14px 16px;
    }
    .ve-account-banner .ve-ab-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
    }
    .ve-account-banner .ve-ab-actions a,
    .ve-account-banner .ve-ab-actions .taiba-button {
        width: 100%;
        min-height: 46px;
        padding: 12px 16px !important;
        font-size: 15px;
    }
}



/* ============================================================
   DONE / INACTIVE ROW STYLING
   ============================================================ */

/* 1. Force grey background and muted text for "Done" rows */
.modern-table tr.row-done td {
    background-color: #f3f4f6 !important; /* Light Grey */
    color: #9ca3af !important; /* Muted Text */
}

/* 2. Disable the hover effect for these rows */
.modern-table tr.row-done:hover td {
    background-color: #f3f4f6 !important; /* Stays Grey */
    cursor: default;
}

/* 3. Ensure links inside done rows are also muted */
.modern-table tr.row-done a {
    color: #6b7280; 
}
.modern-table tr.row-done a:hover {
    color: #5F255F; /* Allow hover on links only */
}

/* 4. Visual indicator for New rows */
.modern-table tr.row-new td:first-child {
    border-left: 4px solid #5F255F;
}


/* ============================================================
   STAFF & STRIKE STYLES (Added for Stafftimings.php)
   ============================================================ */

/* 1. Strike Badges — short labels only; never stretch into long ovals */
.badge-strike {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
    max-width: 100%;
    vertical-align: middle;
}
.badge-yellow { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.badge-orange { background: #FFEDD5; color: #9A3412; border-color: #FDBA74; }
.badge-red    { background: #FEE2E2; color: #B91C1C; border-color: #FCA5A5; }
.badge-status {
    background: #F3F4F6;
    color: #374151;
    border-color: #E5E7EB;
    white-space: normal;
    line-height: 1.35;
    border-radius: 6px;
}

/* Long strike / appeal text — never force into a pill */
.strike-reason-cell {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
}
.strike-appeal-note {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff7ed;
    border-left: 3px solid #ef6c00;
    color: #9a3412;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
}

/* 2. Availability Reason Dropdown (The tiny 'x' or info icon) */
.reason-details { display: inline-block; vertical-align: middle; margin-left: 6px; }
.reason-summary { cursor: pointer; list-style: none; color: #DC2626; font-weight: 800; }
.reason-summary::-webkit-details-marker { display: none; }

.reason-popup {
    margin-top: 6px;
    padding: 10px;
    background: #1f2937;
    color: #fff;
    font-size: 0.85rem;
    border-radius: 6px;
    position: absolute;
    z-index: 50;
    max-width: 250px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 3. Staff Alerts (Success/Fail messages) */
.staff-alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid transparent;
}
.staff-alert-success { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.staff-alert-fail    { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }

/* 4. Last Updated Badge */
.last-update-pill {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #F3F4F6;
    color: #4B5563;
    font-weight: 600;
    margin-left: 8px;
}



/* ============================================================
   SECTION DIVIDERS (For Stafftimings.php)
   ============================================================ */

/* 1. Clear Divider between tools (e.g. between Countdown and Strikes) */
.tool-section {
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb; /* Light grey line */
}
.tool-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 2. Sub-headers (The titles inside the card) */
.tool-header {
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #5F255F; /* Purple to stand out */
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}my
.tool-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #f3f4f6; /* Subtle line after title */
}

/* 3. Reason/Note Box (Dark grey box for "Reason required") */
.info-box-dark {
    background: #1f2937;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* Hidden by default */
}


/* ============================================================
   STAFF TIMINGS - IMPROVED LAYOUT
   ============================================================ */

/* 1. Distinct Form Boxes (Grey areas for inputting data) */
.form-box {
    background-color: #f9fafb; /* Very light grey */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

/* 2. Section Headers (Inside Cards) */
.section-header-inner {
    font-size: 1.1rem;
    font-weight: 700;
    color: #5F255F;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 3. Helper Text */
.helper-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 12px;
    font-style: italic;
}

/* 4. Split Layout for Forms (Label vs Input) */
.form-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; gap: 6px; }
}

/* 5. Label Styling */
.form-label-bold {
    font-weight: 700;
    color: #374151;
    font-size: 0.95rem;
}



/* ============================================================
   MY ACCOUNT STYLES (Modernized)
   ============================================================ */

/* 1. Account Details Rows (Name: Value) */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    font-weight: 700;
    color: #57534E; /* Stone 600 */
}
.detail-value {
    font-weight: 600;
    color: #1C1917; /* Stone 900 */
    text-align: right;
}

/* 2. Admin Link Buttons (Grid of large buttons) */
.admin-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.admin-link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}
.admin-link-card:hover {
    background: #fff;
    border-color: #5F255F;
    color: #5F255F;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}
.admin-link-badge {
    background: #DC2626;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 99px;
    margin-left: 6px;
}

/* 3. Section Titles (Upcoming / Past Orders) */
.section-sub-header {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e5e7eb;
}


/* ============================================================
   MY ACCOUNT - LINK LIST STYLES
   ============================================================ */

/* Force links to be 1 per line (Stacked) */
.admin-link-stack {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between buttons */
}

/* The Button Style */
.admin-link-btn {
    display: flex;
    justify-content: space-between; /* Text left, icon right */
    align-items: center;
    padding: 14px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.admin-link-btn:hover {
    background: #fff;
    border-color: #5F255F;
    color: #5F255F;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateX(4px); /* Slight slide effect */
}

/* Badge for "New" counts */
.count-badge {
    background: #DC2626;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 800;
}



/* ============================================================
   MY ACCOUNT - FINAL POLISH
   ============================================================ */

/* 1. Admin Links: Single on a line (Stacked) */
.admin-link-grid {
    display: flex;       /* Changed from grid to flex */
    flex-direction: column; /* Stack vertically */
    gap: 10px;           /* Space between buttons */
}

.admin-link-card {
    display: flex;
    justify-content: space-between; /* Text left, arrow right */
    align-items: center;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.admin-link-card:hover {
    background: #fff;
    border-color: #5F255F;
    color: #5F255F;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateX(4px); /* Slight slide right on hover */
}

.admin-link-card::after {
    content: '\f054'; /* FontAwesome Chevron Right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    opacity: 0.3;
}
.admin-link-card:hover::after { opacity: 1; }

.admin-link-badge {
    background: #DC2626;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 8px;
}

/* 2. Order List Table (The "Improved Bit") */
.order-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 600px; /* Forces scroll on small screens */
}

.order-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #1f2937;
    font-size: 0.95rem;
}

.order-table tr:last-child td { border-bottom: none; }
.order-table tr:hover td { background-color: #f9fafb; }

/* Column Specifics */
.col-date   { width: 30%; font-weight: 700; color: #111; }
.col-type   { width: 25%; color: #4b5563; }
.col-status { width: 25%; text-align: center; white-space: nowrap; }
.col-action { width: 20%; text-align: right; }

/* Status Badges - No Wrapping */
.status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap; /* Prevents "Deposit Unpaid" splitting */
}

.status-confirmed { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.status-unpaid    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* View Button */
.btn-view {
    padding: 8px 16px;
    background: #5F255F;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}
.btn-view:hover { background: #4C1E4C; color: #fff; }


/* ============================================================
   FIX FOR BLUE TABLES
   ============================================================ */

/* Force the modern tables to be WHITE, overriding the old global 'td' blue */
.order-table td, 
.modern-table td, 
.form-layout-table td {
    background-color: #ffffff !important;
    color: #1f2937 !important; /* Dark Grey Text */
}

/* Ensure hover effect is light grey, not blue */
.order-table tr:hover td,
.modern-table tr:hover td {
    background-color: #f9fafb !important;
}


/* ============================================================
   ADD EVENT PAGE STYLES (Booking Engine)
   ============================================================ */

/* 1. Header Bars (Cyan & Purple from screenshots) */
.header-cyan {
    background-color: #00a3c9;
    color: #ffffff;
    padding: 10px 15px;
    font-weight: 700;
    text-align: center;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

.header-purple {
    background-color: #5F255F; /* Taiba Purple */
    color: #ffffff;
    padding: 10px 15px;
    font-weight: 700;
    text-align: center;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
}

/* 2. Content Boxes under headers */
.content-box-cyan {
    background-color: #00a3c9; /* Full cyan background for content */
    color: #ffffff;
    padding: 15px;
    border-radius: 0 0 4px 4px;
    margin-bottom: 20px;
}
.content-box-cyan a { color: #fff; text-decoration: underline; }

.content-box-white {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: none; /* Connected to header */
    padding: 15px;
    border-radius: 0 0 4px 4px;
    margin-bottom: 20px;
}

/* 3. Package Grid (For Silver/Gold/Plat) */
.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .package-grid { grid-template-columns: 1fr; }
}

/* 4. Form Labels in Cyan Box */
.cyan-label {
    font-weight: 700;
    color: #ffffff;
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    text-align: right;
    padding-right: 10px;
}

/* 5. Input override for Cyan boxes (White text input) */
.input-cyan-box {
    width: 100%;
    padding: 6px;
    border: 1px solid #fff;
    border-radius: 4px;
    color: #333;
}

/* 6. Flex Row for Forms */
.form-row-split {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.form-row-split .label-side { flex: 0 0 160px; text-align: right; padding-right: 15px; font-weight: 700; }
.form-row-split .input-side { flex: 1; }

/* 7. Footer Total Bar */
.footer-total-bar {
    background-color: #00a3c9;
    color: white;
    padding: 10px;
    font-weight: 800;
    text-align: right;
    border-radius: 4px;
    margin-top: 10px;
}

/* ============================================================
   ADD EVENT - COMPACT ADMIN STYLES
   ============================================================ */

/* 1. Admin Cards (Purple/Cyan Headers, WHITE Body) */
.admin-card-purple {
    border: 1px solid #5F255F;
    border-radius: 4px;
    background: #fff; /* Force White */
    margin-bottom: 20px;
    overflow: hidden;
}
.admin-card-cyan {
    border: 1px solid #00a3c9;
    border-radius: 4px;
    background: #fff; /* Force White */
    margin-bottom: 20px;
    overflow: hidden;
}

.header-purple {
    background-color: #5F255F;
    color: #fff;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}
.header-cyan {
    background-color: #00a3c9;
    color: #fff;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}

.card-body-white {
    background-color: #ffffff !important;
    padding: 15px;
    color: #333;
}

/* 2. Compact Inputs (Not too tall) */
.compact-input {
    width: 100%;
    padding: 4px 8px; /* Tighter padding */
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 32px; /* Fixed small height */
}
textarea.compact-input {
    height: auto;
    padding: 8px;
}

/* 3. Form Layout Table (Clean, Compact, White) */
.form-table-compact {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.form-table-compact td {
    padding: 4px 8px; /* Tighter cell spacing */
    vertical-align: middle;
    border: none !important; /* Remove grid lines */
    background: #fff !important; /* NO BLUE */
    font-size: 0.9rem;
}
.form-table-compact td:first-child {
    font-weight: 700;
    width: 35%;
    text-align: right;
    padding-right: 15px;
    color: #444;
}

/* 4. Package Boxes (Silver/Gold/Diamond) */
.package-box {
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
}
.package-list {
    padding: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}



/* ============================================================
   ADD EVENT - RESTORED LAYOUT STYLES
   ============================================================ */

/* 1. The "Add Item" Lists (Restoring the 'secret links' visibility) */
.add-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.add-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    text-decoration: none !important;
}
.add-item-row:last-child { border-bottom: none; }
.add-item-row:hover {
    background-color: #f0f9ff; /* Slight blue tint on hover */
}
.add-item-name {
    font-weight: 700;
    color: #374151; /* Dark Grey */
}
.add-item-row:hover .add-item-name {
    color: #00a3c9; /* Cyan on hover */
}
.add-item-price {
    font-weight: 800;
    color: #1f2937;
}

/* 2. Package Details Text (Restoring the missing text) */
.package-details-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    padding: 15px;
    text-align: left;
}

/* 3. Input Fields (Fixing White-on-White) */
.admin-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db; /* Grey border */
    background-color: #ffffff; /* White bg */
    color: #111111; /* Black text */
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box; /* Fix width issues */
}
.admin-input:focus {
    border-color: #5F255F;
    outline: none;
}

/* 4. Layout Grid Override for AddEvent */
.addevent-split {
    display: grid;
    grid-template-columns: 40% 60%; /* Left form smaller, Right side bigger */
    gap: 20px;
    align-items: start;
}
@media (max-width: 1000px) { .addevent-split { grid-template-columns: 1fr; } }

/* 5. Three Column Grid (For Bottom Sections) */
.three-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}
@media (max-width: 900px) { .three-col-grid { grid-template-columns: 1fr; } }


/* ============================================================
   ADD EVENT - STRUCTURE RESTORED
   ============================================================ */

/* 1. The Main Split Layout (Left: Details+Serving, Right: Items+Files) */
.addevent-grid {
    display: grid;
    grid-template-columns: 45% 53%; /* Matches your original width ratios */
    gap: 2%;
    align-items: start;
    margin-bottom: 40px;
}
@media (max-width: 1000px) { .addevent-grid { grid-template-columns: 1fr; } }

/* 2. Card Containers */
.admin-card {
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    background: #fff;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* 3. Headers (Cyan & Purple) */
.header-cyan {
    background-color: #00a3c9;
    color: #ffffff;
    padding: 12px;
    font-weight: 700;
    text-align: center;
    font-size: 1rem;
}
.header-purple {
    background-color: #5F255F;
    color: #ffffff;
    padding: 12px;
    font-weight: 700;
    text-align: center;
    font-size: 1rem;
}

/* 4. Content Areas */
.card-content {
    padding: 20px;
    background: #fff;
}

/* 5. The "Add Item" Lists (Clickable Rows) */
.item-list-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}
.item-list-row:hover {
    background-color: #f0f9ff;
    color: #00a3c9;
}
.item-list-row b { font-weight: 700; }

/* 6. Form Inputs (Strictly Black Text) */
.modern-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #000 !important; /* Force Black */
    background: #fff !important; /* Force White */
    box-sizing: border-box;
}
.modern-input:focus { border-color: #5F255F; outline: none; }

/* 7. Package Boxes (Bottom Grid) */
.package-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 900px) { .package-grid { grid-template-columns: 1fr; } }

.package-box {
    border: 1px solid #5F255F;
    border-radius: 4px;
    background: #fff;
}
.package-body {
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #444;
}

/* 8. Financials Section (Bottom) */
.financials-box {
    background: #f9fafb;
    border: 1px solid #ccc;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    border-radius: 8px;
}



/* ============================================================
   ADD EVENT - STRICT LEGACY RESTORATION
   ============================================================ */

/* 1. Global Input Fix (Solves White-on-White text) */
.modern-input, 
input[type="text"], 
input[type="password"], 
input[type="date"], 
textarea, 
select {
    color: #111 !important;        /* Force Black Text */
    background-color: #fff !important; /* Clean white fill; border defines the field */
    border: 1px solid #e2e4e9 !important;
    border-radius: 9px;
    padding: 10px 13px;
    font-size: 0.92rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 5px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.modern-input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    background-color: #fff !important;
    border-color: #5F255F !important;
    box-shadow: 0 0 0 3px rgba(95,37,95,.12);
    outline: none;
}
.modern-input:focus {
    border-color: #5F255F !important;
    outline: none;
}

/* 2. Containers (Replacing old tables with Cards) */
.admin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card-content {
    padding: 15px;
}

/* 3. Headers */
.header-cyan {
    background-color: #00a3c9;
    color: white;
    padding: 10px;
    font-weight: 700;
    text-align: center;
}
.header-purple {
    background-color: #5F255F;
    color: white;
    padding: 10px;
    font-weight: 700;
    text-align: center;
}

/* 4. Link Rows (The "Secret Links" made visible) */
.link-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none !important;
    transition: background 0.2s;
}
.link-row:hover {
    background-color: #f0f9ff;
    color: #00a3c9; /* Highlight on hover */
}
.link-row b { font-weight: 700; }

/* 5. Package Details Text */
.package-text {
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333; /* Ensure visible */
    background: #fff;
}

/* 6. Main Grid Layout (Mimics your Table structure) */
.split-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.split-left { width: 40%; }
.split-right { width: 60%; }

/* 3-Column Grid for Bottom */
.tri-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* Mobile Responsive */
@media (max-width: 1000px) {
    .split-layout, .tri-layout { flex-direction: column; display: flex; }
    .split-left, .split-right { width: 100%; }
}


/* ============================================================
   ADD EVENT - STRUCTURE RESTORED (No Tables)
   ============================================================ */

/* 1. Main Grid Layout (Matches your original columns) */
.addevent-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 40px;
}
.addevent-left { width: 40%; display: flex; flex-direction: column; gap: 20px; }
.addevent-right { width: 60%; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 1000px) {
    .addevent-grid { flex-direction: column; }
    .addevent-left, .addevent-right { width: 100%; }
}

/* 2. Admin Cards (Replacing the tables) */
.admin-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header-purple {
    background-color: #5F255F;
    color: #fff;
    padding: 10px;
    font-weight: 700;
    text-align: center;
}
.card-header-cyan {
    background-color: #00a3c9;
    color: #fff;
    padding: 10px;
    font-weight: 700;
    text-align: center;
}
.card-header-cyan a { color: #fff; text-decoration: underline; }

.card-body {
    padding: 15px;
    background: #fff; /* Ensures white background */
    color: #333;
}

/* 3. Inputs (Force visible) */
.admin-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #999 !important;
    background-color: #fff !important;
    color: #000 !important;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.admin-input:focus { border-color: #5F255F !important; outline: none; }

/* 4. "Secret Links" List */
.link-list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none !important;
    transition: background 0.1s;
    font-size: 0.9rem;
}
.link-list-item:hover {
    background-color: #f2f2f2;
    color: #00a3c9;
}
.link-list-item b { font-weight: 700; }

/* 5. Bottom 3-Column Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 800px) { .bottom-grid { grid-template-columns: 1fr; } }

/* 6. Package Details Text */
.package-details {
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #444;
}

/* 7. Label/Field Rows */
.field-row {
    margin-bottom: 8px;
}
.field-label {
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
    color: #333;
    font-size: 0.9rem;
}


/* ============================================================
   MY ACCOUNT - FINAL VISUALS (No Blue Tables)
   ============================================================ */

/* 1. Stacked Admin Links */
.admin-link-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-link-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    color: #374151;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.admin-link-btn:hover {
    border-color: #5F255F;
    color: #5F255F;
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* 2. Notification Badge */
.count-badge {
    background: #DC2626;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 99px;
    margin-left: 8px;
    font-weight: 800;
}

/* 3. Account Details Rows */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #333;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 700; color: #57534E; }
.detail-value { font-weight: 600; color: #1C1917; text-align: right; }

/* 4. Order List (Div Based - Prevents Blue Table Issue) */
.order-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.order-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
    text-decoration: none !important;
    color: #333;
}
.order-card-row:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}
.ocr-date { flex: 2; font-weight: 800; color: #1f2937; }
.ocr-type { flex: 2; color: #4b5563; font-size: 0.9rem; }
.ocr-status { flex: 1.5; text-align: center; }
.ocr-action { flex: 1; text-align: right; }

/* 5. Status Pills */
.status-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-confirmed { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.status-unpaid    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* 6. View Button */
.btn-view-small {
    padding: 8px 16px;
    background: #5F255F;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}
.btn-view-small:hover { background: #4C1E4C; color: #fff; }

/* 7. Renewal Rows */
.renewal-row-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.renewal-label { font-weight: 700; color: #374151; font-size: 0.9rem; }

/* ============================================
   ADDITIONS — Mobile, Modernisation
   ============================================ */

/* ---- Floating WhatsApp Button ---- */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 9000;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}
.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
    color: #fff;
}

/* ---- GDPR Cookie Banner ---- */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 16px 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.88rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    flex-wrap: wrap;
}
.gdpr-banner p {
    margin: 0;
    color: #e0e0e0;
    flex: 1;
    min-width: 200px;
    font-size: 0.88rem;
}
.gdpr-banner a {
    color: var(--gold);
    text-decoration: underline;
}
.gdpr-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.gdpr-accept {
    background: var(--gold);
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: var(--font-body);
}
.gdpr-accept:hover {
    background: #c9a227;
}

/* ---- prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    .hero-slide img { animation: none; }
    .hero-slide { transition: none; }
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   STAFF AREA (root wrappers) — shared modern styling
   Used by: Stafftimings.php, orders.php, checklist.php, stafftraining.php
   ============================================================ */

/* ---- Staff tab bar ------------------------------------------------------
   Desktop: white tab card shown as a 2nd row under the full site header.
   Mobile:  taller purple app bar (logo + tabs + burger); site header hidden. */
body.staff-app main { padding-top: 96px; } /* clear the fixed site header */

.staff-subnav-wrap {
    position: sticky;
    top: 78px;              /* sits just below the header (78px when scrolled) */
    z-index: 900;
    margin: 0 0 24px;
    padding: 12px 16px 0;
}
.staff-subnav {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eadfe8;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 28px -14px rgba(95, 37, 95, 0.45);
}
.staff-subnav-tabs {
    display: flex;
    align-items: stretch;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}
.staff-subnav-tabs a {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 8px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    color: #5F255F;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.staff-subnav-tabs a i { font-size: 1rem; opacity: 0.9; }
.staff-subnav-tabs a:hover { background: #f5edf5; }
.staff-subnav-tabs a.is-active {
    background: #5F255F;
    color: #fff;
    box-shadow: 0 3px 10px rgba(95, 37, 95, 0.3);
}
.staff-subnav-tabs a.is-active i { opacity: 1; }

/* Progress badge on the Checklist tab when a checklist is required */
.staff-subnav-checklist { position: relative; }
.staff-subnav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e67e22;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}
.staff-subnav-badge.is-ready { background: #f0a020; }
.staff-subnav-badge.is-signed { background: #36a17a; min-width: 20px; padding: 0; }
.staff-subnav-tabs a.is-active .staff-subnav-badge { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); }

/* Checklist progress banner (staff area home) */
.staff-checklist-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 14px 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ead9ea;
    border-left: 5px solid #e67e22;
    box-shadow: 0 2px 8px rgba(95, 37, 95, 0.08);
    text-decoration: none;
    color: #4a3f4a;
}
.staff-checklist-banner.is-ready { border-left-color: #f0a020; }
.staff-checklist-banner.is-signed { border-left-color: #36a17a; }
.staff-checklist-banner-ring { width: 44px; height: 44px; }
.staff-checklist-banner-ring > span { font-size: .74rem; }
.staff-checklist-banner-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.staff-checklist-banner-text strong { font-size: 0.98rem; color: #3d2f3d; }
.staff-checklist-banner-text small { font-size: 0.78rem; color: #8b778b; }
.staff-checklist-banner-bar {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 4px;
    border-radius: 999px;
    background: #eee4ee;
    overflow: hidden;
}
.staff-checklist-banner-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #36a17a;
    transition: width 0.3s ease;
}

/* Logo + burger only appear on the mobile purple bar */
.staff-subnav-brand { display: none; }
button.staff-subnav-brand {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    line-height: 0;
}
.staff-subnav-brand img { display: block; height: 40px; width: auto; filter: brightness(0) invert(1); }
.staff-subnav-burger {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    align-self: stretch;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}
.staff-subnav-burger:hover { background: rgba(255, 255, 255, 0.28); }

@media (max-width: 768px) {
    /* Mobile = ONE taller purple app bar; site header hidden */
    body.staff-app .header { display: none !important; }
    body.staff-app main { padding-top: 0; }

    .staff-subnav-wrap {
        top: 0;
        height: 90px;               /* matches site header height */
        margin-bottom: 18px;
        padding: 0 12px;
        display: flex;
        align-items: center;
        background: #5F255F;
        box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.4);
        transition: height 0.3s ease;
    }
    /* Shrinks to 78px on scroll, same as the site header */
    .header.scrolled ~ main .staff-subnav-wrap { height: 78px; }

    .staff-subnav {
        width: 100%;
        gap: 8px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    .staff-subnav-brand { display: flex; align-items: center; flex: 0 0 auto; }
    .staff-subnav-brand img { height: 40px; }
    .staff-subnav-burger { display: inline-flex; min-height: 48px; }

    .staff-subnav-tabs { gap: 3px; }
    .staff-subnav-tabs a {
        flex-direction: column;
        gap: 3px;
        padding: 6px 4px;
        min-height: 48px;
        font-size: 0.66rem;
        border-radius: 9px;
        color: rgba(255, 255, 255, 0.85);
    }
    .staff-subnav-tabs a i { font-size: 1.25rem; opacity: 0.95; }
    .staff-subnav-tabs a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
    .staff-subnav-tabs a.is-active {
        background: #fff;
        color: #5F255F;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
}

/* ---- Generic success/fail alerts on root staff pages (unified) ---- */
body .success,
body .fail {
    position: relative;
    max-width: 1100px;
    margin: 12px auto;
    padding: 14px 16px 14px 44px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid transparent;
    text-align: left;
    line-height: 1.45;
}
body .success::before,
body .fail::before {
    position: absolute;
    left: 16px;
    top: 13px;
    font-weight: 700;
}
body .success { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
body .fail    { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
body .success::before { content: "\2714"; color: #059669; }
body .fail::before    { content: "\26A0"; color: #dc2626; }

/* ============================================================
   ORDERS (root orders.php via staffarea/orders.php)
   Self-contained port of the staff-panel order layout
   ============================================================ */
.orders-shell {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 50px;
}
.orders-shell.has-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}
.orders-shell-side,
.orders-shell-main { min-width: 0; }
.orders-list-toggle { display: none; }
@media (min-width: 900px) {
    .orders-shell.has-detail {
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    }
    .orders-shell.has-detail .orders-list-panel {
        position: sticky;
        top: 108px;
        max-height: calc(100vh - 128px);
        overflow-y: auto;
    }
}
@media (max-width: 899px) {
    .orders-shell.has-detail .orders-list-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 0 12px;
        min-height: 48px;
        padding: 12px 16px;
        border: none;
        border-radius: 10px;
        background: #5F255F;
        color: #fff;
        font-weight: 700;
        font-size: 15px;
        cursor: pointer;
    }
    .orders-shell.has-detail .orders-list-panel { display: none; }
    .orders-shell.has-detail.list-open .orders-list-panel { display: block; }
}

/* Panels */
.staff-panel {
    margin: 0 0 18px;
    padding: 0;
    background: #fff;
    border: 1px solid #ece3ec;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(95, 37, 95, 0.07);
    text-align: left;
    overflow: hidden;
}
.staff-panel-body { padding: 14px 16px 16px; }

.ae-like-header {
    background: #5F255F;
    color: #fff;
    padding: 11px 16px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid #C5A059;
}
.ae-like-header-meta {
    font-weight: 600;
    opacity: 0.75;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 6px;
}
.ae-like-header-link {
    float: right;
    color: #E5C585 !important;
    text-decoration: none !important;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.ae-like-header-link:hover { color: #fff !important; }

/* Orders list rows */
.orders-list-modern { list-style: none; margin: 0; padding: 0; }
.orders-list-modern a {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 0.9fr);
    gap: 10px 14px;
    align-items: center;
    min-height: 56px;
    padding: 16px 18px;
    border-bottom: 1px solid #efe7ef;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.12s ease;
}
.orders-list-modern a:hover { background: #faf6fa; }
.orders-list-modern a:last-child { border-bottom: none; }
.orders-list-modern a.is-active {
    background: #F7EEF7;
    box-shadow: inset 3px 0 0 #5F255F;
}
.orders-list-date { font-weight: 800; color: #5F255F; font-size: 0.9rem; }
.orders-list-name { font-weight: 700; color: #2d1f2d; font-size: 0.95rem; }
.orders-list-type { font-size: 0.8rem; font-weight: 700; color: #7a6570; text-align: right; }
.orders-list-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.orders-list-badge--warn { background: #fef3c7; color: #92400e; }
.orders-list-badge--danger { background: #fee2e2; color: #dc2626; }
@media (max-width: 640px) {
    .orders-list-modern a { grid-template-columns: 1fr; gap: 4px; }
    .orders-list-type { text-align: left; }
}

/* Order detail grid + key/value tables */
.staff-order-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
    text-align: left;
    margin: 0 0 18px;
    align-items: start;
}
@media (min-width: 900px) {
    .staff-order-grid { grid-template-columns: 1fr 1fr; }
}
.staff-order-grid > .staff-panel { height: auto; align-self: start; }

.staff-kv { width: 100%; border-collapse: collapse; }
.staff-kv-label {
    width: 38%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #7a6570;
    background: transparent;
    border-bottom: 1px solid #ececed;
    vertical-align: top;
}
.staff-kv-value {
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    color: #2d1f2d;
    background: #fff;
    border-bottom: 1px solid #ececed;
}
.staff-subhead {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #57534E;
    background: #f4f4f5;
    border-bottom: 1px solid #e4e4e7;
}

/* Menu / serving split */
.staff-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
@media (max-width: 700px) { .staff-split { grid-template-columns: 1fr; } }
.staff-split-col { padding: 12px 14px; border-right: 1px solid #efe7ef; }
.staff-split-col:last-child { border-right: none; }
.staff-split-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a6570;
    margin-bottom: 8px;
}
.staff-prose {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    color: #2d1f2d;
    white-space: pre-line;
}
.staff-prose--pad { padding: 12px 14px; }
.staff-prose br + br { display: none; }
.staff-notes-divider {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #57534E;
    background: #f4f4f5;
    border-top: 1px solid #e4e4e7;
}
.is-muted { color: #7a6570 !important; font-weight: 500 !important; }

/* Serving-per-table stat blocks */
.staff-serve-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.staff-serve-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: #f7f7f8;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
}
.staff-serve-stat.is-empty { opacity: 0.55; }
.staff-serve-stat--tables {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    align-self: start;
}
.staff-serve-num {
    font-size: 1.55rem;
    font-weight: 800;
    color: #5F255F;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.staff-serve-name {
    font-size: 12px;
    font-weight: 700;
    color: #7a6570;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.staff-serve-empty { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; }

/* Package inclusions */
.staff-package-panel .staff-panel-body { padding: 14px 16px 16px; }
.staff-package-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 800px) { .staff-package-grid { grid-template-columns: 1fr; } }
.staff-package {
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    opacity: 0.5;
}
.staff-package.is-active { opacity: 1; border-color: #5F255F; }
.staff-package-title {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #44403C;
    background: #f4f4f5;
}
.staff-package.is-active .staff-package-title { background: #5F255F; color: #fff; }
.staff-package-body {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #2d1f2d;
}

/* Shift schedule + files */
.staff-schedule-block { padding: 0; }
.staff-schedule-slot {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0e8f0;
}
.staff-schedule-slot:last-child { border-bottom: none; }
.staff-schedule-time { font-size: 0.8rem; font-weight: 800; color: #5F255F; }
.staff-schedule-people { font-size: 0.9rem; font-weight: 600; color: #2d1f2d; line-height: 1.45; }
.staff-schedule-person { display: block; padding: 2px 0; font-weight: 600; }
.staff-file-link {
    display: block;
    padding: 11px 16px;
    border-bottom: 1px solid #f0e8f0;
    font-weight: 700;
    color: #5F255F !important;
    text-decoration: none;
}
.staff-file-link:last-child { border-bottom: none; }
.staff-file-link:hover { background: #faf6fa; }

/* Order files — compact inline chips (rare, usually a single attachment) */
.orders-files-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
}
.orders-files-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #7a6570;
}
.orders-files-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.orders-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 240px;
    padding: 6px 12px;
    border: 1px solid #e6d9e6;
    border-radius: 999px;
    background: #faf6fa;
    font-size: 0.85rem;
    font-weight: 700;
    color: #5F255F !important;
    text-decoration: none;
}
.orders-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orders-file-chip:hover { background: #f1e6f1; border-color: #d3bcd3; }

/* Empty state */
.staff-empty { padding: 28px 18px; text-align: center; color: #7a6570; font-size: 0.9rem; font-weight: 600; }
.staff-empty strong { display: block; margin-bottom: 4px; color: #2d1f2d; font-size: 1rem; }

/* ============================================================
   LIVE CHECKLIST — mobile-first shared team workflow
   ============================================================ */
.checklist-shell {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 18px 90px;
}
.checklist-report-shell { max-width: 1040px; }
.checklist-app,
.checklist-history,
.checklist-setup-app,
.training-setup-app {
    --check-purple: #5f255f;
    --check-purple-dark: #481a48;
    --check-gold: #c5a059;
    --check-green: #16805a;
    --check-border: #e8e2e8;
    color: #201a20;
    font-family: var(--font-body);
}
.checklist-app {
    color: #201a20;
    font-family: var(--font-body);
}
/* Ensure the [hidden] attribute always wins over the display rules below. */
.checklist-app [hidden] { display: none !important; }

/* Purple checklist / history banner */
.checklist-banner{
    position: relative;
    margin: 4px 0 16px;
    padding: 18px 18px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #5F255F 0%, #3d1845 100%);
    color: #fff;
    box-shadow: 0 14px 36px -18px rgba(95,37,95,0.75);
    overflow: hidden;
}
.checklist-banner-main{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.checklist-banner-title{
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 4.5vw, 2rem);
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
}
.checklist-banner-sub,
.checklist-banner .checklist-day-label{
    margin: 6px 0 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.9rem;
    line-height: 1.4;
}
.checklist-banner-status{
    margin: 8px 0 0;
    color: rgba(255,255,255,0.92);
    font-size: 0.86rem;
    font-weight: 650;
}
.checklist-banner-actions{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.checklist-banner-btn{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.checklist-banner-btn.is-solid{
    background: #fff;
    border-color: #fff;
    color: #5F255F;
}
.checklist-banner-btn.is-ghost:hover,
.checklist-banner-btn:hover{
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.checklist-banner-btn.is-solid:hover{
    background: #f7eef7;
    color: #5F255F;
}
.checklist-banner-btn .cl-photos-count{
    display: inline-flex;
    min-width: 1.3em;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    font-size: 0.72rem;
    font-weight: 800;
    justify-content: center;
}
.checklist-banner .checklist-live{
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
}
.checklist-banner-progress{
    margin-top: 14px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    overflow: hidden;
}
.checklist-banner-progress > span{
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: #fff;
    transition: width .35s cubic-bezier(0.22, 1, 0.36, 1);
}

.checklist-notes-card{
    margin: 14px 0 18px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ebe4eb;
    box-shadow: 0 8px 24px -18px rgba(45,20,45,0.35);
}
.checklist-notes-head{
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}
.checklist-notes-head strong{
    color: #2a222a;
    font-size: 1rem;
}
.checklist-notes-head span{
    color: #7a717a;
    font-size: 0.82rem;
}
.checklist-notes-field textarea{
    display: block;
    width: 100%;
    min-height: 88px;
    padding: 12px 12px;
    border: 1px solid #e2dae2;
    border-radius: 12px;
    background: #f7f5f7;
    color: #2a222a;
    font: inherit;
    font-size: 0.92rem;
    resize: vertical;
    box-sizing: border-box;
}
.checklist-notes-field textarea:disabled{
    opacity: 0.7;
}
.checklist-notes-actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.checklist-notes-status{
    color: #6b616b;
    font-size: 0.78rem;
}
.checklist-notes-save{
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    border-radius: 10px;
    background: #5F255F;
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
}
.checklist-notes-save:disabled{
    opacity: 0.45;
    cursor: not-allowed;
}

.checklist-history-stats{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}
.checklist-history-stat{
    padding: 14px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    box-shadow: 0 10px 24px -16px rgba(45, 20, 45, 0.35);
    text-align: center;
}
.checklist-history-stat strong{
    display: block;
    color: #5F255F;
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1.1;
}
.checklist-history-stat span{
    display: block;
    margin-top: 4px;
    color: #7a717a;
    font-size: 0.78rem;
    font-weight: 650;
}

.checklist-history-session > summary{
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}
.checklist-history-ring{
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 auto;
    font-size: 0.72rem !important;
}
.checklist-signoff-badge.is-closed{
    background: #e5f6ee;
    color: #176047;
}
.checklist-signoff-badge.is-alert{
    background: #fde8ec;
    color: #9b1c3a;
}
.checklist-signoff-badge.is-progress{
    background: #fff4e5;
    color: #9a5b12;
}
.checklist-history-glimpse{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px 8px;
    margin: 4px 0 14px;
    padding: 4px 2px 2px;
}
.checklist-history-glimpse-cat{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.checklist-history-glimpse-ring{
    width: 48px !important;
    height: 48px !important;
    font-size: 0.62rem !important;
}
.checklist-history-glimpse-name{
    max-width: 100%;
    overflow: hidden;
    color: #5a525a;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-history-toolbar{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.checklist-history-tabs{
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    border-radius: 12px;
    background: #f3eef3;
    border: 1px solid #e8e0e8;
}
.checklist-history-tab{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6b616b;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    cursor: pointer;
}
.checklist-history-tab.is-active{
    background: #5F255F;
    color: #fff;
}
.checklist-history-tab strong{
    display: inline-flex;
    min-width: 1.4em;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.12);
    font-size: 0.74rem;
    justify-content: center;
}
.checklist-history-tab.is-active strong{
    background: rgba(255,255,255,0.2);
}
.checklist-history-toolbar .checklist-banner-btn{
    border-color: #d8cfe0;
    background: #fff;
    color: #5F255F;
}
.checklist-history-toolbar .checklist-banner-btn .cl-photos-count{
    background: rgba(95,37,95,0.12);
}
.checklist-history-todo-row{
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #faf7fa;
    border: 1px solid #efe8ef;
    margin-bottom: 8px;
}
.checklist-history-todo-row strong{ color: #2a222a; font-size: 0.9rem; }
.checklist-history-todo-row span{ color: #7a717a; font-size: 0.8rem; }
.checklist-history-done-list{
    list-style: none;
    margin: 0;
    padding: 0;
}
.checklist-history-done-list li{
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 2px;
    border-bottom: 1px solid #efe8ef;
}
.checklist-history-more{
    margin-top: 12px;
    border-top: 1px solid #efe8ef;
    padding-top: 8px;
}
.checklist-history-more > summary{
    cursor: pointer;
    color: #5F255F;
    font-weight: 750;
    font-size: 0.86rem;
}
.checklist-history-ring.checklist-progress-ring,
.checklist-history-glimpse-ring.checklist-progress-ring{
    background: conic-gradient(#5F255F calc(var(--progress) * 1%), #ebe4eb 0);
}
.checklist-history-ring.checklist-progress-ring.is-complete,
.checklist-history-glimpse-ring.checklist-progress-ring.is-complete{
    background: #5F255F;
}
.checklist-history-ring.checklist-progress-ring.is-complete::before,
.checklist-history-glimpse-ring.checklist-progress-ring.is-complete::before{
    background: #fff;
}
@media (max-width: 640px){
    .checklist-history-stats{ gap: 8px; }
    .checklist-history-stat{ padding: 12px 8px; }
    .checklist-history-stat strong{ font-size: 1.25rem; }
    .checklist-banner-actions{ width: 100%; justify-content: flex-start; }
    .checklist-history-toolbar{ flex-direction: column; align-items: stretch; }
    .checklist-history-tabs{ width: 100%; }
}

.checklist-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 4px 0 18px;
}
.checklist-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--check-purple);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.checklist-hero h1,
.checklist-hero .taiba-page-title {
    margin: 0;
    color: #5F255F;
    font-family: var(--font-body, 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(1.5rem, 4vw, 1.9rem);
    line-height: 1.15;
}
.checklist-hero p {
    max-width: 550px;
    margin: 8px 0 0;
    color: #6b616b;
    font-size: 0.94rem;
    line-height: 1.55;
}
.checklist-view-only-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px 16px;
    color: #5a455a;
    background: #f7f2f7;
    border: 1px solid #e5d8e5;
    border-left: 4px solid #8b6a8b;
    border-radius: 12px;
}
.checklist-sync-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px 16px;
    color: #5a455a;
    background: #fff8ef;
    border: 1px solid #f0dfc4;
    border-left: 4px solid #c5a059;
    border-radius: 12px;
}
.checklist-sync-banner[hidden] { display: none !important; }
.checklist-sync-banner.is-syncing {
    color: #216b50;
    background: #edf8f3;
    border-color: #cdeadd;
    border-left-color: #278663;
}
.checklist-sync-banner > i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #b8862f;
    font-size: 1.1rem;
}
.checklist-sync-banner.is-syncing > i { color: #278663; }
.checklist-sync-banner > span {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
}
.checklist-sync-banner strong {
    font-size: 0.95rem;
    color: #3d2f3d;
}
.checklist-sync-banner.is-syncing strong { color: #176047; }
.checklist-sync-banner small {
    color: #746074;
    font-size: 0.84rem;
    line-height: 1.4;
}
.checklist-sync-banner button {
    flex: 0 0 auto;
    align-self: center;
    min-height: 40px;
    padding: 8px 14px;
    color: #fff;
    background: var(--check-purple);
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}
.checklist-sync-banner button:disabled {
    opacity: 0.55;
    cursor: wait;
}
.checklist-task-meta.is-queued {
    color: #9a6b1a;
    font-weight: 700;
}
.checklist-view-only-banner > i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #7a5a7a;
    font-size: 1.1rem;
}
.checklist-view-only-banner > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}
.checklist-view-only-banner strong {
    font-size: 0.95rem;
    color: #3d2f3d;
}
.checklist-view-only-banner small {
    color: #746074;
    font-size: 0.84rem;
    line-height: 1.4;
}
.checklist-intro {
    max-width: 560px;
    margin: 6px 0 0;
    color: #7a707a;
    font-size: 0.86rem;
    line-height: 1.5;
}
.checklist-hero-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.checklist-live {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
    color: #216b50;
    background: #edf8f3;
    border: 1px solid #cdeadd;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 750;
}
.checklist-admin-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    color: #fff;
    background: var(--check-purple);
    border: 1px solid var(--check-purple-dark);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s ease;
}
.checklist-admin-link:hover { background: var(--check-purple-dark); color: #fff; }
.checklist-admin-link .cl-photos-count,
.checklist-admin-link strong.cl-photos-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35em;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.4;
}
button.checklist-admin-link {
    font: inherit;
    cursor: pointer;
}
.checklist-history-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 13px;
    color: var(--check-purple);
    background: #f6f0f6;
    border: 1px solid #e6d7e6;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 780;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.checklist-history-link:hover { background: var(--check-purple); color: #fff; }
.checklist-live-dot {
    width: 8px;
    height: 8px;
    background: #24a975;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(36, 169, 117, 0.12);
}
.checklist-app.is-syncing .checklist-live-dot {
    background: var(--check-gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15);
    animation: checklist-pulse 1.2s ease-in-out infinite;
}
.checklist-app.is-offline .checklist-live {
    color: #9a4e35;
    background: #fff4ee;
    border-color: #f3d4c4;
}
.checklist-app.is-offline .checklist-live-dot {
    background: #d86b48;
    box-shadow: 0 0 0 4px rgba(216, 107, 72, 0.12);
}
@keyframes checklist-pulse {
    50% { opacity: 0.38; transform: scale(0.82); }
}

.checklist-summary {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--check-border);
    border-radius: 14px;
}
.checklist-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.checklist-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    font-size: 1rem;
    min-width: 0;
    flex: 1 1 auto;
}
.checklist-progress-copy strong { color: #3d333d; font-size: 1.05rem; }
.checklist-layout-switch {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid #e4dae4;
    border-radius: 11px;
    background: #f6f1f6;
}
.checklist-layout-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7a6b7a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.checklist-layout-switch button.is-active {
    background: #fff;
    color: var(--check-purple);
    box-shadow: 0 2px 8px rgba(55, 26, 55, 0.12);
}
.checklist-layout-switch button:focus-visible {
    outline: 2px solid var(--check-purple);
    outline-offset: 1px;
}
.checklist-task-cat {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 3px;
    padding: 2px 8px;
    overflow: hidden;
    color: #6b556b;
    background: #f3eef3;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.35;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.checklist-group--when {
    border-left-width: 4px;
}
.checklist-group--when.is-when-before {
    border-left-color: #c4a46a;
}
.checklist-group--when.is-when-during {
    border-left-color: #6a7fa0;
}
.checklist-group--when.is-when-all {
    border-left-color: var(--check-purple, #5f255f);
}
.checklist-group--when .checklist-group-toggle {
    gap: 14px;
    border-bottom: 1px solid transparent;
}
.checklist-group--when.is-open .checklist-group-toggle {
    border-bottom-color: #ebe3eb;
}
.checklist-group--when.is-when-before .checklist-group-toggle {
    color: #6a5730;
    background: linear-gradient(90deg, #faf4e8 0%, #fff 72%);
}
.checklist-group--when.is-when-during .checklist-group-toggle {
    color: #3f5068;
    background: linear-gradient(90deg, #eef2f8 0%, #fff 72%);
}
.checklist-group--when.is-when-all .checklist-group-toggle {
    color: #5f255f;
    background: linear-gradient(90deg, #f6eef6 0%, #fff 72%);
}
.checklist-group--when.is-when-before .checklist-group-toggle strong { color: #7a6a48; }
.checklist-group--when.is-when-during .checklist-group-toggle strong { color: #4a5d78; }
.checklist-group--when.is-when-all .checklist-group-toggle strong { color: #5f255f; }
.checklist-when-head {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}
.checklist-when-badge {
    display: inline-flex;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 0.95rem;
}
.checklist-group--when.is-when-before .checklist-when-badge {
    color: #7a6a48;
    background: #f0e4c8;
    box-shadow: inset 0 0 0 1px rgba(196, 164, 106, 0.35);
}
.checklist-group--when.is-when-during .checklist-when-badge {
    color: #4a5d78;
    background: #dce5f0;
    box-shadow: inset 0 0 0 1px rgba(106, 127, 160, 0.35);
}
.checklist-group--when.is-when-all .checklist-when-badge {
    color: #5f255f;
    background: #eaddeb;
    box-shadow: inset 0 0 0 1px rgba(95, 37, 95, 0.2);
}
.checklist-when-copy {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 10px;
}
.checklist-group--when .checklist-group-toggle strong {
    font-size: 1.12rem;
    letter-spacing: 0.01em;
}
.checklist-group--when .checklist-group-cue {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 750;
}
.checklist-progress-track {
    height: 10px;
    overflow: hidden;
    background: #eee8ee;
    border-radius: 999px;
}
.checklist-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--check-purple), #864386);
    border-radius: inherit;
    transition: width 0.35s ease;
}
.checklist-live-signoff {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: -2px 0 14px;
    padding: 12px 14px;
    color: #176047;
    background: #edf8f3;
    border: 1px solid #c9e8db;
    border-radius: 12px;
}
.checklist-live-signoff > i { flex: 0 0 auto; font-size: 1.2rem; }
.checklist-live-signoff > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.checklist-live-signoff strong { font-size: .86rem; }
.checklist-live-signoff small { color: #58766a; font-size: .72rem; line-height: 1.35; }
.checklist-photo-alert {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: -2px 0 14px;
    padding: 11px 13px;
    color: #805a12;
    background: #fff9e9;
    border: 1px solid #f0dfac;
    border-radius: 12px;
}
.checklist-photo-alert > i { flex: 0 0 auto; font-size: 1.05rem; }
.checklist-photo-alert > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.checklist-photo-alert strong { font-size: .84rem; }
.checklist-photo-alert small { color: #836f43; font-size: .72rem; line-height: 1.35; }
.checklist-staff-signoff {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: -2px 0 14px;
    padding: 16px;
    color: #3f333f;
    background: #fff;
    border: 1px solid #e8dfe8;
    border-left: 4px solid var(--check-gold);
    border-radius: 13px;
}
.checklist-signoff-head {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}
.checklist-signoff-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.checklist-staff-signoff strong { color: #2f242f; font-size: 1.05rem; }
.checklist-staff-signoff .checklist-signoff-head > span { color: #746874; font-size: 0.9rem; line-height: 1.45; }
.checklist-signoff-lock-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    color: #8a3d0b;
    background: #ffe8d2;
    border: 1px solid #f0c28a;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.checklist-signoff-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(180px, .85fr) auto;
    gap: 12px;
    align-items: end;
}
.checklist-ready-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.checklist-ready-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #f7f4f7;
    border-radius: 10px;
    color: #564a56;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
}
.checklist-ready-list li.is-ok {
    color: #176047;
    background: #edf8f3;
}
.checklist-ready-list li.is-blocked {
    color: #8a3d0b;
    background: #fff4ea;
}
.checklist-ready-list li[data-ready-action] {
    cursor: pointer;
}
.checklist-ready-list li > i {
    flex: 0 0 auto;
    margin-top: 2px;
}
.checklist-ready-list li.is-ok > i { color: #278663; }
.checklist-ready-list li.is-blocked > i { color: #d9701a; }
.checklist-staff-signoff label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}
.checklist-staff-signoff label span {
    color: #776b77;
    font-size: .74rem;
    font-weight: 820;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.checklist-staff-signoff input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    background: #fbf9fb;
    border: 1px solid #e4dbe4;
    border-radius: 10px;
    font: inherit;
    font-size: .9rem;
    box-sizing: border-box;
}
.checklist-staff-signoff .checklist-signoff-responsibility {
    align-self: center;
    flex-direction: row;
    align-items: flex-start;
    gap: 11px;
}
.checklist-staff-signoff .checklist-signoff-responsibility input {
    flex: 0 0 auto;
    width: 24px;
    min-height: 24px;
    height: 24px;
    margin: 1px 0 0;
    padding: 0;
    accent-color: #278663;
}
.checklist-staff-signoff .checklist-signoff-responsibility span {
    color: #514751;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: none;
}
.checklist-staff-signoff button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 16px;
    color: #fff;
    background: var(--check-purple);
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: .92rem;
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
}
.checklist-staff-signoff button:disabled {
    opacity: 1;
    cursor: not-allowed;
}
.checklist-staff-signoff.is-disabled,
.checklist-staff-signoff.is-blocked {
    color: #6d6170;
    background: #f3f0f3;
    border: 1px dashed #c9bbc9;
    border-left: 4px solid #c47a28;
}
.checklist-staff-signoff.is-disabled strong,
.checklist-staff-signoff.is-blocked strong { color: #564a56; }
.checklist-staff-signoff.is-disabled .checklist-signoff-head > span,
.checklist-staff-signoff.is-blocked .checklist-signoff-head > span { color: #7a6d7a; }
.checklist-staff-signoff.is-disabled .checklist-signoff-fields,
.checklist-staff-signoff.is-blocked .checklist-signoff-fields {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(0.25);
}
.checklist-staff-signoff.is-disabled input,
.checklist-staff-signoff.is-blocked input {
    background: #ece8ec;
    border-color: #d5ccd5;
    color: #8a7e8a;
}
.checklist-staff-signoff.is-disabled button,
.checklist-staff-signoff.is-blocked button {
    color: #fff;
    background: #9a889a;
    box-shadow: none;
}
.checklist-staff-signoff.is-ready {
    background: #f3fbf7;
    border: 1px solid #c9e8db;
    border-left: 4px solid #278663;
}
.checklist-staff-signoff.is-ready .checklist-signoff-fields {
    opacity: 1;
    pointer-events: auto;
    filter: none;
}

/* Prominent "why you can't sign off" callout */
.checklist-signoff-reason {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0 0;
    padding: 12px 14px;
    color: #8a3d0b;
    background: #fff2e4;
    border: 1px solid #f4cea0;
    border-left: 4px solid #e07a1f;
    border-radius: 10px;
}
.checklist-signoff-reason > i {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 1.05rem;
    color: #d9701a;
}
.checklist-signoff-reason > span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.checklist-signoff-reason strong {
    color: #7c360a !important;
    font-size: .8rem;
    font-weight: 850;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.checklist-signoff-reason > span > span {
    color: #8a4712;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.4;
}

.checklist-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    color: #554955;
    background: #f9fafb;
    border: 1px solid #e8dfe8;
    border-radius: 11px;
    font-size: 0.86rem;
    font-weight: 650;
}
.checklist-notice.is-success,
.checklist-notice.is-live {
    color: #176047;
    background: #ecf8f3;
    border-color: #c9e8db;
}
.checklist-notice.is-error {
    color: #9b3838;
    background: #fff0f0;
    border-color: #f0cccc;
}
.checklist-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    color: #786d78;
    font-size: 0.9rem;
    font-weight: 650;
}
.checklist-spinner {
    width: 21px;
    height: 21px;
    border: 2px solid #e2d8e2;
    border-top-color: var(--check-purple);
    border-radius: 50%;
    animation: checklist-spin 0.75s linear infinite;
}
@keyframes checklist-spin { to { transform: rotate(360deg); } }

/* ---- Checklist / history micro-interactions ---- */
@keyframes cl-motion-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@keyframes cl-motion-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes cl-motion-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes cl-motion-sheet-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
@keyframes cl-motion-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.035); }
    100% { transform: scale(1); }
}
@keyframes cl-motion-check-pop {
    0% { transform: scale(0.97); }
    55% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
@keyframes cl-motion-ready-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(47, 154, 114, 0.28); }
    50% { box-shadow: 0 0 0 8px rgba(47, 154, 114, 0); }
}
@keyframes cl-motion-sync-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}
@keyframes cl-motion-flash {
    0% { opacity: 0; transform: translateY(4px); }
    20% { opacity: 1; transform: none; }
    100% { opacity: 1; }
}

.checklist-notice:not([hidden]) {
    animation: cl-motion-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-undo-toast:not([hidden]) {
    animation: cl-motion-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-confirm:not([hidden]) .checklist-confirm-backdrop {
    animation: cl-motion-fade-in 0.2s ease both;
}
.checklist-confirm:not([hidden]) .checklist-confirm-sheet {
    animation: cl-motion-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-offline-modal:not([hidden]) .checklist-offline-sheet,
.checklist-offline-modal:not([hidden]) .checklist-confirm-sheet {
    animation: cl-motion-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.checklist-group.is-open .checklist-task-list {
    animation: cl-motion-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-group.is-open .checklist-photo-thumb {
    animation: cl-motion-enter 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-group.is-open .checklist-photo-thumb:nth-child(1) { animation-delay: 0.02s; }
.checklist-group.is-open .checklist-photo-thumb:nth-child(2) { animation-delay: 0.05s; }
.checklist-group.is-open .checklist-photo-thumb:nth-child(3) { animation-delay: 0.08s; }
.checklist-group.is-open .checklist-photo-thumb:nth-child(4) { animation-delay: 0.11s; }
.checklist-group.is-open .checklist-photo-thumb:nth-child(n+5) { animation-delay: 0.14s; }

.checklist-photo-thumb.is-enter,
.checklist-photo-thumb.is-queued {
    animation: cl-motion-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.checklist-task.is-just-done {
    animation: cl-motion-check-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
    background: #eef8f3;
}
.checklist-task.is-just-undone {
    animation: cl-motion-enter 0.28s ease both;
}
.checklist-task-action {
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.checklist-sticky-sync.is-syncing {
    animation: cl-motion-sync-pulse 1.35s ease-in-out infinite;
}
.checklist-sticky-status button.is-ready {
    animation: cl-motion-ready-pulse 2.2s ease-in-out infinite;
}
.checklist-staff-signoff.is-ready {
    animation: cl-motion-ready-pulse 2.4s ease-in-out infinite;
}
.checklist-notes-status.is-flash {
    animation: cl-motion-flash 0.7s ease both;
    color: #176047;
    font-weight: 750;
}

.checklist-history-day-row:active {
    transform: scale(0.985);
    box-shadow: 0 6px 16px -14px rgba(45, 20, 45, 0.35);
}
.checklist-report-bar span,
.checklist-session-mini-bar span {
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.checklist-banner-btn,
.checklist-day-back,
.checklist-day-view-photos,
.account-cl-photos-btn {
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.checklist-banner-btn:active,
.checklist-day-back:active,
.checklist-day-view-photos:active,
.account-cl-photos-btn:active {
    transform: scale(0.97);
}

.account-cl-view:not([hidden]) {
    animation: cl-motion-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.account-cl-cat:active {
    transform: scale(0.96);
}
.account-cl-item {
    animation: cl-motion-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.account-cl-item:nth-child(1) { animation-delay: 0.02s; }
.account-cl-item:nth-child(2) { animation-delay: 0.05s; }
.account-cl-item:nth-child(3) { animation-delay: 0.08s; }
.account-cl-item:nth-child(4) { animation-delay: 0.11s; }
.account-cl-item:nth-child(5) { animation-delay: 0.14s; }
.account-cl-item:nth-child(n+6) { animation-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
    .checklist-notice:not([hidden]),
    .checklist-undo-toast:not([hidden]),
    .checklist-confirm:not([hidden]) .checklist-confirm-backdrop,
    .checklist-confirm:not([hidden]) .checklist-confirm-sheet,
    .checklist-group.is-open .checklist-task-list,
    .checklist-group.is-open .checklist-photo-thumb,
    .checklist-photo-thumb.is-enter,
    .checklist-photo-thumb.is-queued,
    .checklist-task.is-just-done,
    .checklist-task.is-just-undone,
    .checklist-task.is-focus-left,
    .checklist-sticky-sync.is-syncing,
    .checklist-sticky-status button.is-ready,
    .checklist-staff-signoff.is-ready,
    .checklist-notes-status.is-flash,
    .account-cl-view:not([hidden]),
    .account-cl-item,
    .checklist-day-view,
    .checklist-day-focus-panel.is-active,
    .checklist-day-focus-panel.is-active .checklist-day-task-list li,
    .cl-gallery-modal,
    .cl-gallery-top,
    .cl-gallery-bottom,
    .cl-gallery-img {
        animation: none !important;
        transition: none !important;
    }
    .checklist-day-view,
    .checklist-day-focus-panel,
    .checklist-day-task-list li {
        opacity: 1 !important;
        transform: none !important;
    }
    .cl-gallery-modal.is-open .cl-gallery-top,
    .cl-gallery-modal.is-open .cl-gallery-bottom,
    .cl-gallery-img.is-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

.checklist-groups {
    display: grid;
    gap: 12px;
}
.checklist-left {
    margin: 0 0 14px;
    padding: 12px 12px 10px;
    background: #fffdf8;
    border: 1px solid #ead9a8;
    border-radius: 14px;
    box-shadow: 0 10px 28px -25px rgba(55, 26, 55, 0.7);
}
.checklist-left[hidden] { display: none !important; }
.checklist-left-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.checklist-left-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}
.checklist-left-copy strong {
    color: #3d333d;
    font-size: 1.02rem;
    font-weight: 820;
}
.checklist-left-copy span {
    color: #7a6b4f;
    font-size: 0.82rem;
    font-weight: 650;
}
.checklist-left-jump {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 12px;
    color: #fff;
    background: var(--check-purple, #5f255f);
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
}
.checklist-left-list {
    display: grid;
    gap: 6px;
    max-height: min(42vh, 320px);
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
    -webkit-overflow-scrolling: touch;
}
.checklist-left-item {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #322832;
    background: #fff;
    border: 1px solid #efe3c4;
    border-radius: 11px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}
.checklist-left-item:active {
    transform: scale(0.99);
}
.checklist-left-item > i {
    flex: 0 0 auto;
    width: 1.1rem;
    color: #a07a18;
    text-align: center;
}
.checklist-left-item-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}
.checklist-left-item-copy strong {
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 750;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-left-item-copy small {
    color: #7d6e7d;
    font-size: 0.78rem;
    font-weight: 650;
}
.checklist-left-item-go {
    flex: 0 0 auto;
    color: var(--check-purple, #5f255f);
    font-size: 0.78rem;
    font-weight: 800;
}
.checklist-group.has-outstanding {
    border-color: #e2d09a;
}
.checklist-group.has-outstanding > .checklist-group-toggle {
    background: linear-gradient(180deg, #fffdf7 0%, #fff 100%);
}
.checklist-task.is-outstanding:not(.is-complete) {
    background: #fffdf6;
    box-shadow: inset 3px 0 0 #d4a017;
}
.checklist-task.is-outstanding:not(.is-complete) .checklist-task-copy strong {
    font-weight: 780;
}
.checklist-task.is-focus-left {
    z-index: 1;
    background: #faf4ff !important;
    box-shadow: inset 3px 0 0 var(--check-purple, #5f255f), 0 0 0 2px rgba(95, 37, 95, 0.22);
    animation: checklist-focus-left 1.1s ease;
}
@keyframes checklist-focus-left {
    0% { box-shadow: inset 3px 0 0 var(--check-purple, #5f255f), 0 0 0 0 rgba(95, 37, 95, 0.0); }
    35% { box-shadow: inset 3px 0 0 var(--check-purple, #5f255f), 0 0 0 6px rgba(95, 37, 95, 0.18); }
    100% { box-shadow: inset 3px 0 0 var(--check-purple, #5f255f), 0 0 0 2px rgba(95, 37, 95, 0.22); }
}

.checklist-group {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--check-border);
    border-radius: 15px;
    box-shadow: 0 10px 28px -25px rgba(55, 26, 55, 0.85);
}
.checklist-group-toggle {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    color: #372d37;
    background: #fff;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.checklist-group-toggle > span {
    display: flex;
    align-items: baseline;
    gap: 9px;
}
.checklist-group-toggle strong {
    font-size: 1.05rem;
    font-weight: 800;
}
.checklist-group-toggle small {
    color: #897d89;
    font-size: 0.86rem;
    font-weight: 650;
}
.checklist-group-cue.is-done {
    color: #176047;
    font-weight: 750;
}
.checklist-done-toggle {
    display: flex;
    width: 100%;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 0 4px;
    padding: 8px 12px;
    color: #4a3a4a;
    background: #f3eef3;
    border: 1px solid #e4dae4;
    border-radius: 10px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.checklist-done-toggle:hover,
.checklist-done-toggle:focus-visible {
    color: var(--check-purple);
    background: #ebe3eb;
    border-color: #d8cdd8;
    outline: none;
}
.checklist-done-toggle.is-open {
    color: #176047;
    background: #eef7f2;
    border-color: #cfe6da;
}
.checklist-done-toggle-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.checklist-done-toggle-copy > i {
    color: #7a6b7a;
    font-size: 0.9rem;
}
.checklist-done-toggle.is-open .checklist-done-toggle-copy > i {
    color: #278663;
}
.checklist-done-toggle-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    place-items: center;
    color: #5f4a5f;
    background: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}
.checklist-done-toggle.is-open .checklist-done-toggle-count {
    color: #176047;
}
.checklist-done-toggle-chevron {
    color: #8a7c8a;
    font-size: 0.72rem;
    transition: transform 0.18s ease;
}
.checklist-done-toggle.is-open .checklist-done-toggle-chevron {
    transform: rotate(180deg);
}
.checklist-group-empty {
    display: grid;
    gap: 4px;
    padding: 14px 12px 10px;
    color: #786d78;
    text-align: center;
}
.checklist-group-empty strong {
    color: #4a404a;
    font-size: 0.92rem;
    font-weight: 780;
}
.checklist-group-empty span {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}
.checklist-group-tools {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.checklist-photo-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 25px;
    padding: 3px 8px;
    color: #756975;
    background: #f3eff3;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 820;
}
.checklist-photo-count.is-complete { color: #267356; background: #e7f6ef; }
.checklist-photo-count.is-missing { color: #946b19; background: #fff3d5; }
.checklist-photo-meter {
    --progress: 0;
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(#c5a059 calc(var(--progress) * 1%), #ebe4e4 0);
}
.checklist-photo-meter::before {
    position: absolute;
    inset: 4px;
    background: #fff;
    border-radius: inherit;
    content: "";
}
.checklist-photo-meter > i,
.checklist-photo-meter > strong {
    position: relative;
    z-index: 1;
}
.checklist-photo-meter > i {
    color: #8a6a2a;
    font-size: 0.7rem;
    line-height: 1;
}
.checklist-photo-meter > strong {
    color: #514651;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
}
.checklist-photo-meter.is-missing {
    background: conic-gradient(#e0a020 calc(var(--progress) * 1%), #f0e6d4 0);
}
.checklist-photo-meter.is-complete {
    background: #36a17a;
}
.checklist-photo-meter.is-complete::before { background: #edf8f3; }
.checklist-photo-meter.is-complete > i,
.checklist-photo-meter.is-complete > strong { color: #176047; }
.checklist-progress-ring {
    --progress: 0;
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#36a17a calc(var(--progress) * 1%), #e9e4e9 0);
}
.checklist-progress-ring::before {
    position: absolute;
    inset: 4px;
    background: #fff;
    border-radius: inherit;
    content: "";
}
.checklist-progress-ring > span {
    position: relative;
    z-index: 1;
    color: #514651;
    font-size: .58rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.02em;
}
.checklist-progress-ring.is-complete { background: #36a17a; }
.checklist-progress-ring.is-complete > span { color: #247154; }
/* Account hero rings: always white % on solid complete fill */
.account-hero--checklist .checklist-progress-ring.is-complete > span,
.account-cl-cat-ring.checklist-progress-ring.is-complete > span {
  color: #fff !important;
}
.account-hero--checklist .checklist-progress-ring.is-complete::before,
.account-cl-cat-ring.checklist-progress-ring.is-complete::before {
  display: none !important;
  content: none !important;
}
.checklist-progress-ring.is-unknown {
    background: #e9e4e9;
}
.checklist-progress-ring.is-unknown::before {
    border: 1px dashed #b9afb9;
}
.checklist-signoff-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    color: #5a4a2a;
    background: #fff8e8;
    border: 1px solid #efdfad;
    border-radius: 12px;
}
.checklist-signoff-status > i { flex: 0 0 auto; margin-top: 2px; color: #9a752d; }
.checklist-signoff-status > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checklist-signoff-status strong { font-size: .86rem; }
.checklist-signoff-status small { color: #7a6a48; font-size: .72rem; line-height: 1.35; }
.checklist-day-label {
    margin: 4px 0 0;
    color: #8b778b;
    font-size: .78rem;
    font-weight: 700;
}
.checklist-reset-btn { border-color: #d7c4d7; }
.checklist-task-action.is-mark {
    background: #5F255F;
}
.checklist-task-action.is-undo {
    background: #6b7280;
}
.checklist-app.is-view-only .checklist-task-action:disabled {
    opacity: .72;
}
.checklist-group-tools > i {
    color: #8b778b;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}
.checklist-group.is-open .checklist-group-tools > i { transform: rotate(180deg); }
.checklist-group-check {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #278663, #49a985);
    border-radius: 50%;
    font-size: 0.65rem;
}
.checklist-task-list {
    display: none;
    gap: 0;
    padding: 0 10px 8px;
}
.checklist-group.is-open .checklist-task-list { display: grid; }
/* Setup / history admin lists must stay visible (not the live checklist accordion). */
.checklist-task-manager .checklist-task-list,
.checklist-setup-app .checklist-task-list,
.training-setup-app .checklist-task-list,
.checklist-admin-settings .checklist-task-list {
    display: block;
    padding: 0;
}
.checklist-category-evidence {
    position: relative;
    margin: 0 0 8px;
    padding: 11px 12px;
    background: #f6faf8;
    border: 0;
    border-radius: 9px;
}
.checklist-category-evidence.is-missing {
    background: #fffbf1;
    border: 0;
}
.checklist-category-evidence.is-uploading,
.checklist-photo-task.is-uploading {
    opacity: .62;
    pointer-events: none;
}
.checklist-photo-task .checklist-task-action.is-photo {
    position: relative;
    overflow: hidden;
    background: #317e61;
    cursor: pointer;
}
.checklist-photo-task .checklist-task-action.is-photo input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.checklist-photo-task .checklist-task-copy strong {
    color: #805a12;
}
.checklist-evidence-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.checklist-evidence-head > span {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2px 7px;
    min-width: 0;
}
.checklist-evidence-head > span > i {
    grid-row: 1 / 3;
    color: #48806a;
}
.checklist-evidence-head strong { color: #39453f; font-size: .82rem; }
.checklist-evidence-head small { color: #7a867f; font-size: .69rem; line-height: 1.3; }
.checklist-evidence-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 9px;
    padding: 8px 9px;
    color: #554a3a;
    background: #fdf6e6;
    border: 0;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
}
.checklist-evidence-note i { flex: 0 0 auto; margin-top: 2px; color: #9a752d; }
.checklist-photo-add {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    color: #fff;
    background: #317e61;
    border-radius: 9px;
    font-size: .74rem;
    font-weight: 820;
    cursor: pointer;
    white-space: nowrap;
}
.checklist-photo-add input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.checklist-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.checklist-photo-grid:not(:empty) { margin-top: 10px; }
.checklist-photo-thumb {
    position: relative;
    min-width: 0;
    margin: 0;
}
.checklist-photo-thumb a {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8eeeb;
    border-radius: 9px;
    cursor: zoom-in;
}
.checklist-history-photo-grid a[data-cl-photo-open] {
    cursor: zoom-in;
}
.checklist-photo-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.checklist-photo-time {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1;
    max-width: calc(100% - 10px);
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(20, 12, 24, 0.72);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}
.checklist-photo-thumb figcaption {
    margin-top: 4px;
    overflow: hidden;
    color: #77827c;
    font-size: .62rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-photo-thumb.is-queued {
    outline: 2px dashed #c5a059;
    outline-offset: 2px;
    border-radius: 11px;
}
.checklist-photo-thumb.is-queued figcaption {
    color: #9a6b1a;
    font-weight: 750;
}
.checklist-photo-pending-placeholder {
    display: grid;
    aspect-ratio: 4 / 3;
    place-items: center;
    color: #9a6b1a;
    background: #fff8ef;
    border-radius: 9px;
    font-size: 1.2rem;
}
.checklist-photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    color: #fff;
    background: rgba(48, 36, 48, .82);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.checklist-task {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 6px 15px 10px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #f0ecf0;
    border-radius: 0;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.checklist-task + .checklist-task { margin-top: 0; }
.checklist-task:last-child { border-bottom: 0; }
.checklist-task.is-saving {
    opacity: 0.55;
    pointer-events: none;
    transform: scale(0.99);
}
.checklist-task.is-complete { background: #f5faf7; }
.checklist-task-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}
.checklist-task-copy strong {
    color: #302730;
    font-size: 1.08rem;
    font-weight: 720;
    line-height: 1.35;
}
.checklist-task.is-complete .checklist-task-copy strong {
    color: #53665f;
    text-decoration: line-through;
    text-decoration-color: #9eb3aa;
}
.checklist-task-meta {
    color: #8b7f8b;
    font-size: 0.86rem;
    line-height: 1.3;
}
.checklist-task-when {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 6px;
    color: #6b556b;
    background: #f3eef3;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.35;
    text-transform: uppercase;
}
.checklist-task.is-when-before .checklist-task-when {
    color: #7a6a48;
    background: #f3ead6;
}
.checklist-task.is-when-during .checklist-task-when {
    color: #4a5d78;
    background: #e2e8f1;
}
.checklist-task.is-complete .checklist-task-meta { color: #5f7b70; }
.checklist-task-action {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 76px;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 13px;
    color: #fff;
    background: var(--check-purple);
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
}
.checklist-task-action:hover { background: var(--check-purple-dark); }
.checklist-task-action:active { transform: scale(0.96); }
.checklist-task-action:disabled { cursor: wait; }
.checklist-task.is-complete .checklist-task-action {
    color: #50655c;
    background: #e4f1eb;
    box-shadow: none;
}

.checklist-empty {
    padding: 46px 22px;
    color: #776b77;
    background: #fff;
    border: 1px dashed #d9cfd9;
    border-radius: 16px;
    text-align: center;
}
.checklist-empty-icon {
    display: inline-grid;
    width: 55px;
    height: 55px;
    margin-bottom: 13px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #278663, #49a985);
    border-radius: 50%;
    box-shadow: 0 9px 20px -10px rgba(30, 123, 88, 0.8);
}
.checklist-empty h2 {
    margin: 0 0 6px;
    color: #413641;
    font-size: 1.1rem;
}
.checklist-empty p {
    margin: 0;
    font-size: 0.86rem;
}
.checklist-sticky-status {
    position: fixed;
    z-index: 40;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    display: flex;
    max-width: 788px;
    flex-direction: column;
    gap: 8px;
    margin: 0 auto;
    /* No transform on fixed roots — iOS PWA jumps mid-screen with it */
}
.checklist-sticky-status[hidden] { display: none !important; }
.checklist-sticky-sync {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    color: #2f242f;
    background: rgba(241, 209, 141, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(12px);
    text-align: center;
}
.checklist-sticky-sync[hidden] { display: none !important; }
.checklist-sticky-sync.is-syncing {
    color: #dff7ea;
    background: rgba(39, 134, 99, 0.96);
    cursor: wait;
}
.checklist-sticky-sync:disabled {
    opacity: 0.85;
    cursor: default;
}
.checklist-sticky-sync > i {
    flex: 0 0 auto;
    font-size: 0.95rem;
}
.checklist-sticky-status button#checklist-sticky-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    background: rgba(55, 27, 55, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    text-align: left;
}
.checklist-sticky-status button#checklist-sticky-button[hidden] { display: none !important; }
.checklist-sticky-status button.is-ready {
    background: rgba(23, 96, 71, 0.96);
    border-color: rgba(255, 255, 255, 0.14);
}
.checklist-sticky-status button#checklist-sticky-button > span:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}
.checklist-sticky-status strong { color: #f1d18d; font-size: 1.05rem; }
.checklist-sticky-status button.is-ready strong { color: #dff7ea; }
.checklist-sticky-sub {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 600;
}
.checklist-sticky-live {
    display: inline-flex;
    max-width: 40%;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: #c9eedd;
    font-size: 0.85rem;
    font-weight: 750;
    line-height: 1.3;
    text-align: right;
}
.checklist-app:has(.checklist-sticky-status.has-sync) .checklist-undo-toast {
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}

.checklist-undo-toast {
    position: fixed;
    z-index: 45;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    display: flex;
    max-width: 788px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 auto;
    padding: 12px 14px;
    color: #fff;
    background: rgba(40, 28, 40, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 650;
    backdrop-filter: blur(10px);
}
.checklist-undo-toast[hidden] { display: none !important; }
.checklist-undo-toast > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-undo-toast button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    color: #2f242f;
    background: #f1d18d;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 850;
    cursor: pointer;
    touch-action: manipulation;
}

.checklist-confirm {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: end center;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.checklist-confirm[hidden] { display: none !important; }
.checklist-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 22, 32, 0.45);
}
.checklist-confirm-sheet {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 20px 18px 16px;
    color: #2f242f;
    background: #fff;
    border: 1px solid #e8dfe8;
    border-radius: 16px;
}
.checklist-confirm-sheet strong {
    display: block;
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 820;
}
.checklist-confirm-sheet p {
    margin: 0 0 18px;
    color: #6b616b;
    font-size: 0.94rem;
    line-height: 1.45;
}
.checklist-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.checklist-confirm-actions button {
    min-height: 48px;
    padding: 10px 14px;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
}
.checklist-confirm-cancel {
    color: #514751;
    background: #f3eef3;
}
.checklist-confirm-ok {
    color: #fff;
    background: #a33b3b;
}

.checklist-offline-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.checklist-offline-modal[hidden] { display: none !important; }
.checklist-offline-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 18, 28, 0.55);
}
.checklist-offline-sheet {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 24px 20px 18px;
    color: #2f242f;
    background: #fff;
    border: 1px solid #e8dfe8;
    border-radius: 18px;
    text-align: center;
}
.checklist-offline-icon {
    position: relative;
    display: inline-grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    place-items: center;
    color: #9a4e35;
    background: #fff4ee;
    border: 1px solid #f3d4c4;
    border-radius: 50%;
    font-size: 1.45rem;
}
.checklist-offline-slash {
    position: absolute;
    top: 50%;
    left: 12%;
    width: 76%;
    height: 3px;
    background: #9a4e35;
    border-radius: 999px;
    transform: rotate(-32deg);
}
.checklist-offline-sheet > strong {
    display: block;
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 820;
}
.checklist-offline-sheet > p {
    margin: 0 0 10px;
    color: #6b616b;
    font-size: 0.94rem;
    line-height: 1.45;
}
.checklist-offline-status {
    margin: 0 0 16px !important;
    color: #8a3d0b !important;
    font-size: 0.88rem !important;
    font-weight: 700;
}
.checklist-offline-actions {
    display: grid;
    gap: 8px;
}
.checklist-offline-actions button {
    min-height: 48px;
    padding: 10px 14px;
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
}
.checklist-offline-retry {
    color: #fff;
    background: var(--check-purple, #5f255f);
}
.checklist-offline-retry:disabled {
    opacity: 0.65;
    cursor: wait;
}
.checklist-offline-continue {
    color: #514751;
    background: #f3eef3;
}

@media (max-width: 768px) {
    .checklist-shell { padding: 0 12px calc(94px + env(safe-area-inset-bottom, 0px)); }
    .checklist-hero {
        display: block;
        margin-top: 2px;
    }
    .checklist-hero p { font-size: 0.9rem; }
    .checklist-live {
        margin-top: 12px;
        min-height: 30px;
        padding: 5px 10px;
    }
    .checklist-admin-link {
        width: 100%;
        margin-top: 8px;
        min-height: 48px;
    }
    .checklist-summary { padding: 14px; }
    .checklist-progress-row { gap: 10px; }
    .checklist-layout-switch { width: 100%; }
    .checklist-layout-switch button { flex: 1; justify-content: center; }
    .checklist-staff-signoff { grid-template-columns: 1fr; }
    .checklist-signoff-fields { grid-template-columns: 1fr; }
    .checklist-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checklist-evidence-head { align-items: stretch; flex-direction: column; }
    .checklist-photo-add { width: 100%; box-sizing: border-box; }
    .checklist-group-toggle { padding: 11px 13px; }
    .checklist-done-toggle { min-height: 38px; padding: 7px 11px; }
    .checklist-task {
        min-height: 78px;
        padding-left: 10px;
    }
    .checklist-task-meta { font-size: 0.84rem; }
    .checklist-task-action {
        min-width: 64px;
        min-height: 54px;
        flex-direction: column;
        gap: 2px;
        padding: 7px 9px;
        font-size: 0.76rem;
    }
    .checklist-undo-toast {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 390px) {
    .checklist-group-toggle > span {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

/* ---- Checklist history / archive page ---- */
.checklist-history-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 15px;
    color: var(--check-purple);
    background: #f6f0f6;
    border: 1px solid #e6d7e6;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 780;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.checklist-history-back:hover { background: var(--check-purple); color: #fff; }
.checklist-history-session {
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--check-border);
    border-radius: 15px;
}
.checklist-history-session.is-signed {
    border-left: 4px solid #278663;
}
.checklist-history-session.is-unsigned {
    border-left: 4px solid #e07a1f;
    background: #fffdf8;
}
.checklist-history-session.is-override {
    border-left: 4px solid #c2410c;
}
.checklist-history-session > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 72px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}
.checklist-history-session > summary::-webkit-details-marker { display: none; }
.checklist-history-summary-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
}
.checklist-history-summary-side {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}
.checklist-history-title {
    color: #2f242f;
    font-size: 1rem;
    font-weight: 820;
}
.checklist-history-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.checklist-history-signoff-line {
    color: #514751;
    font-size: 0.9rem;
    font-weight: 700;
}
.checklist-history-session.is-signed .checklist-history-signoff-line { color: #176047; }
.checklist-history-session.is-unsigned .checklist-history-signoff-line { color: #9a5b12; }
.checklist-history-summary {
    color: #897d89;
    font-size: 0.82rem;
    font-weight: 650;
}
.checklist-history-chevron {
    flex: 0 0 auto;
    color: #8b778b;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}
.checklist-history-session[open] .checklist-history-chevron { transform: rotate(180deg); }
.checklist-history-body {
    padding: 4px 16px 18px;
    border-top: 1px solid #f0eaf0;
}
.checklist-session-actions {
    margin: 12px 0 16px;
    padding: 12px;
    background: #fbf9fb;
    border: 1px solid #eee5ee;
    border-radius: 12px;
}
.checklist-session-control {
    margin-top: 10px;
}
.checklist-session-control > summary {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 0;
    color: var(--check-purple);
    font-size: 0.86rem;
    font-weight: 780;
    cursor: pointer;
    list-style: none;
}
.checklist-session-control > summary::-webkit-details-marker { display: none; }
.checklist-session-control[open] > summary { margin-bottom: 8px; }
.checklist-session-control .checklist-signoff-form { margin-top: 4px; }
.checklist-history-list {
    display: grid;
    gap: 12px;
}
.checklist-history-day-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 78px;
    padding: 16px 16px 16px 14px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    border-left: 4px solid #c9b4d4;
    border-radius: 18px;
    box-shadow: 0 10px 28px -18px rgba(45, 20, 45, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.15s ease;
}
.checklist-history-day-row.is-signed {
    border-left-color: #36a17a;
}
.checklist-history-day-row.is-unsigned {
    border-left-color: #e08a55;
    background: #fffdf9;
}
.checklist-history-day-row.is-override {
    border-left-color: #c2410c;
}
.checklist-history-day-row:hover,
.checklist-history-day-row:focus-visible {
    background: #fcfafc;
    box-shadow: 0 14px 32px -16px rgba(45, 20, 45, 0.42);
    transform: translateY(-1px);
}
.checklist-history-day-row .checklist-history-chevron {
    color: #c0b0c0;
    transform: none;
    font-size: 0.85rem;
}
.checklist-history-day-row .checklist-history-summary {
    display: block;
    line-height: 1.35;
}
.checklist-history-filters-wrap {
    margin: 12px 0 16px;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 22px -18px rgba(45, 20, 45, 0.3);
}
.checklist-history-filters-wrap > summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 780;
    color: var(--check-purple);
    list-style: none;
}
.checklist-history-filters-wrap > summary::-webkit-details-marker { display: none; }
.checklist-history-filters-wrap .checklist-report-filters {
    padding: 0 16px 16px;
}

/* Live AJAX history search */
.checklist-history-search {
    margin: 0 0 16px;
}
.checklist-history-search-form { display: grid; gap: 8px; }
.checklist-history-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checklist-history-search-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #e4dbe4;
    border-radius: 14px;
    box-shadow: 0 8px 22px -18px rgba(45, 20, 45, 0.35);
}
.checklist-history-search-main > i {
    flex: 0 0 auto;
    color: #9a879a;
    font-size: 0.95rem;
}
.checklist-history-search-main input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2a222a;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.checklist-history-search-main input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}
.checklist-history-search-clear {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #d9ced9;
    border-radius: 14px;
    background: #fff;
    color: #2a222a;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}
.checklist-history-search-clear:hover {
    background: #faf7fb;
    border-color: #cbb9cb;
}
.checklist-history-search-meta {
    min-height: 1.1em;
    padding: 0 2px;
    color: #7a717a;
    font-size: 0.8rem;
    font-weight: 650;
}
.checklist-history-search-meta.is-loading { color: #5f255f; }
.checklist-history-search-meta.is-error { color: #9b1c3a; }

.checklist-history-hits {
    margin: 0 0 14px;
}
.checklist-history-hits-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}
.checklist-history-hit {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    border-left: 4px solid #c9b4d4;
    border-radius: 16px;
    box-shadow: 0 10px 28px -18px rgba(45, 20, 45, 0.35);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, transform 0.15s ease;
}
.checklist-history-hit:hover {
    background: #fcfafc;
    transform: translateY(-1px);
}
.checklist-history-hit-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.checklist-history-hit-task {
    color: #2a222a;
    font-size: 1rem;
    font-weight: 820;
}
.checklist-history-hit-cat {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3ebf5;
    color: #5f255f;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 780;
}
.checklist-history-hit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: #7a717a;
    font-size: 0.82rem;
    font-weight: 620;
}
.checklist-history-hit-meta b {
    color: #3a303a;
    font-weight: 760;
}
.checklist-history-search-empty {
    padding: 28px 16px;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    border-radius: 16px;
}
.checklist-history-search-empty h2 {
    margin: 0 0 6px;
    color: #2a222a;
    font-size: 1.05rem;
}
.checklist-history-search-empty p {
    margin: 0;
    color: #7a717a;
    font-size: 0.86rem;
}
#checklist-history-feed.is-searching [data-hs-extras] { display: none; }

@media (max-width: 480px) {
    .checklist-history-search-row { gap: 8px; }
    .checklist-history-search-clear {
        min-height: 44px;
        padding: 0 14px;
        font-size: 0.84rem;
    }
    .checklist-history-hit { padding: 12px 14px; }
}

/* Day detail — category browser */
.checklist-day-view {
    display: grid;
    gap: 12px;
    opacity: 1;
    transform: none;
}
.checklist-day-view.is-enter:not(.is-ready) {
    opacity: 0;
    transform: translateY(14px);
}
.checklist-day-view.is-enter {
    transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.checklist-day-view.is-ready {
    opacity: 1;
    transform: none;
}
.checklist-day-status-bar {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}
.checklist-day-status-bar.is-closed {
    color: #1f6b4f;
    background: #e7f6ef;
}
.checklist-day-status-bar.is-alert {
    color: #9a3412;
    background: #ffedd5;
}
.checklist-day-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}
.checklist-day-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(90, 50, 110, 0.18);
    background: #fff;
    color: var(--check-purple);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 750;
    box-shadow: 0 6px 16px -12px rgba(45, 20, 45, 0.4);
}
.checklist-day-heading {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    color: #2a222a;
    font-size: 1.15rem;
    font-weight: 820;
}
.checklist-day-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    border-left: 4px solid #b89bc8;
    border-radius: 20px;
    box-shadow: 0 14px 36px -20px rgba(45, 20, 45, 0.4);
}
.checklist-day-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px 12px;
}
.checklist-day-card-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.checklist-day-card-copy strong {
    color: #2a222a;
    font-size: 1.02rem;
}
.checklist-day-card-copy span {
    color: #8a7d8a;
    font-size: 0.82rem;
    font-weight: 650;
}
.checklist-day-cat-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
    margin: 0 12px 12px;
    padding: 14px 10px 12px;
    border-radius: 18px;
    background: linear-gradient(160deg, #5a3474 0%, #4a2863 55%, #3f2258 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.checklist-day-cat-chip {
    appearance: none;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 6px 4px 4px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.checklist-day-cat-chip.is-active {
    border-color: #e4c78a;
    background: rgba(255,255,255,0.06);
}
.checklist-day-cat-chip.is-pop {
    animation: checklist-day-cat-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.checklist-day-cat-chip em {
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: rgba(255,255,255,0.88);
}
.checklist-day-cat-ring.checklist-progress-ring {
    width: 54px;
    height: 54px;
    box-shadow: 0 6px 14px -8px rgba(0,0,0,0.45);
}
.checklist-day-cat-ring.checklist-progress-ring > span {
    font-size: 0.72rem;
    font-weight: 820;
}
.checklist-day-cat-chip.is-complete .checklist-day-cat-ring.checklist-progress-ring {
    background: #36a17a;
}
.checklist-day-cat-chip.is-complete .checklist-day-cat-ring.checklist-progress-ring > span {
    color: #1f5f48;
}
.checklist-day-cat-chip.is-active:not(.is-complete) .checklist-day-cat-ring.checklist-progress-ring {
    background: conic-gradient(#e4c78a calc(var(--progress) * 1%), rgba(255,255,255,0.18) 0);
}
.checklist-day-focus {
    padding: 4px 14px 16px;
    background: linear-gradient(180deg, #f7f4f8 0%, #fbfafc 40%, #fff 100%);
}
.checklist-day-focus-panel[hidden] {
    display: none !important;
}
.checklist-day-focus-panel {
    opacity: 1;
    transform: none;
}
.checklist-day-focus-panel.is-active {
    animation: checklist-day-focus-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-day-focus-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.checklist-day-focus-head strong {
    display: block;
    color: #2a222a;
    font-size: 1.08rem;
}
.checklist-day-focus-head span {
    color: #8a7d8a;
    font-size: 0.82rem;
    font-weight: 650;
}
.checklist-day-view-photos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid rgba(90, 50, 110, 0.14);
    border-radius: 999px;
    background: #fff;
    color: #3d2d45;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 18px -14px rgba(45, 20, 45, 0.45);
}
.checklist-day-view-photos strong {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--check-purple);
    color: #fff;
    font-size: 0.72rem;
}
.checklist-day-view-photos:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.checklist-day-photo-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.checklist-day-photo-thumb {
    appearance: none;
    display: grid;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: center;
    min-width: 0;
}
.checklist-day-photo-frame {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #e8e0ea;
    box-shadow: 0 6px 14px -10px rgba(45, 20, 45, 0.5);
}
.checklist-day-photo-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    background: #e8e0ea;
}
.checklist-day-photo-time {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    max-width: calc(100% - 12px);
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(20, 12, 24, 0.72);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}
.checklist-day-photo-thumb > span:not(.checklist-day-photo-frame) {
    color: #9a8c9a;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-day-pre-event-note {
    margin: -4px 0 14px;
    color: #8a7d8a;
    font-size: 0.78rem;
    font-weight: 650;
}
.checklist-day-pre-event-order {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid rgba(90, 50, 110, 0.1);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px -20px rgba(45, 20, 45, 0.4);
}
.checklist-day-pre-event-order > header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.checklist-day-pre-event-order > header .checklist-day-cat-ring.checklist-progress-ring {
    width: 48px;
    height: 48px;
    background: conic-gradient(var(--check-purple, #5F255F) calc(var(--progress) * 1%), #ebe4eb 0);
}
.checklist-day-pre-event-order > header .checklist-day-cat-ring.checklist-progress-ring.is-complete {
    background: #36a17a;
}
.checklist-day-pre-event-order > header .checklist-day-cat-ring.checklist-progress-ring > span {
    color: #4a3a4a;
    font-size: 0.66rem;
}
.checklist-day-pre-event-order > header strong {
    display: block;
    color: #2a222a;
    font-size: 0.94rem;
}
.checklist-day-pre-event-order > header small {
    color: #8f838f;
    font-size: 0.78rem;
    font-weight: 650;
}
.checklist-day-section-label {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 820;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.checklist-day-section-label.is-todo { color: #c2410c; }
.checklist-day-section-label.is-done { color: #2f6b54; }
.checklist-day-task-list {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.06);
    border-radius: 16px;
    box-shadow: 0 10px 24px -18px rgba(45, 20, 45, 0.35);
    overflow: hidden;
}
.checklist-day-task-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-top: 1px solid #f0ebf0;
    opacity: 1;
    transform: none;
}
.checklist-day-focus-panel.is-active .checklist-day-task-list li {
    animation: checklist-day-row-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.checklist-day-task-list li:first-child { border-top: 0; }
.checklist-day-focus-panel.is-active .checklist-day-task-list li:nth-child(1) { animation-delay: 0.04s; }
.checklist-day-focus-panel.is-active .checklist-day-task-list li:nth-child(2) { animation-delay: 0.07s; }
.checklist-day-focus-panel.is-active .checklist-day-task-list li:nth-child(3) { animation-delay: 0.1s; }
.checklist-day-focus-panel.is-active .checklist-day-task-list li:nth-child(4) { animation-delay: 0.13s; }
.checklist-day-focus-panel.is-active .checklist-day-task-list li:nth-child(5) { animation-delay: 0.16s; }
.checklist-day-focus-panel.is-active .checklist-day-task-list li:nth-child(n+6) { animation-delay: 0.18s; }
.checklist-day-task-list li > span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.checklist-day-task-list strong {
    color: #2a222a;
    font-size: 0.94rem;
}
.checklist-day-task-list small {
    color: #8f838f;
    font-size: 0.78rem;
}
.checklist-day-task-mark {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    border: 2px solid #d5ccd5;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-size: 0.62rem;
}
.checklist-day-task-list li.is-done .checklist-day-task-mark {
    border: 0;
    background: #36a17a;
}
.checklist-day-notes-card {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(90, 50, 110, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px -18px rgba(45, 20, 45, 0.35);
}
.checklist-day-notes-card h2 {
    margin: 0 0 10px;
    color: var(--check-purple);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
@keyframes checklist-day-cat-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.06); }
    100% { transform: scale(1); }
}
@keyframes checklist-day-focus-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@keyframes checklist-day-row-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@media (max-width: 420px) {
    .checklist-day-cat-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .checklist-day-photo-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
}
.checklist-admin-settings.is-page {
    margin-top: 8px;
}
.checklist-admin-settings.is-page .checklist-admin-settings-body {
    display: grid;
    gap: 12px;
}
.checklist-history-empty {
    margin: 14px 0 4px;
    color: #897d89;
    font-size: 0.86rem;
}
.checklist-history-group { margin-top: 16px; }
.checklist-history-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--check-purple);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.checklist-history-cat span {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    place-items: center;
    color: #6d5b6d;
    background: #f0eaf0;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0;
}
.checklist-history-items { margin: 0; padding: 0; list-style: none; }
.checklist-history-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eef3f0;
    border-radius: 10px;
    background: #f6faf8;
}
.checklist-history-items li + li { margin-top: 6px; }
.checklist-history-item-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #33413b;
    font-size: 0.9rem;
    font-weight: 680;
}
.checklist-history-item-name i {
    flex: 0 0 auto;
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #278663, #49a985);
    border-radius: 50%;
    font-size: 0.6rem;
}
.checklist-history-item-meta {
    flex: 0 0 auto;
    color: #7f8f88;
    font-size: 0.74rem;
    font-weight: 620;
    text-align: right;
}
.checklist-report-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
    margin: 0 0 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--check-border);
    border-radius: 15px;
    box-shadow: 0 10px 28px -25px rgba(55, 26, 55, 0.85);
}
.checklist-report-filters label:first-child {
    grid-column: span 2;
}
.checklist-report-filters label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}
.checklist-report-filters label span {
    color: #776b77;
    font-size: 0.72rem;
    font-weight: 820;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.checklist-report-filters input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: #2f242f;
    background: #fbf9fb;
    border: 1px solid #e4dbe4;
    border-radius: 10px;
    font: inherit;
    font-size: 0.86rem;
    box-sizing: border-box;
}
.checklist-report-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.checklist-report-actions button,
.checklist-report-actions a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 10px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.checklist-report-actions button {
    color: #fff;
    background: var(--check-purple);
    border: 1px solid var(--check-purple);
}
.checklist-report-actions a {
    color: var(--check-purple);
    background: #f6f0f6;
    border: 1px solid #e6d7e6;
}
.checklist-report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.checklist-today-glance {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--check-border);
    border-left: 4px solid var(--check-purple);
    border-radius: 14px;
}
.checklist-today-glance.is-signed { border-left-color: #278663; }
.checklist-today-glance.is-unsigned { border-left-color: #e07a1f; background: #fffdf8; }
.checklist-today-dash {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--check-border);
    border-left: 4px solid var(--check-purple);
    border-radius: 14px;
}
.checklist-today-dash.is-signed { border-left-color: #278663; }
.checklist-today-dash.is-ready { border-left-color: #278663; background: #f7fbf9; }
.checklist-today-dash.is-action { border-left-color: #c47a28; background: #fffaf3; }
.checklist-today-dash.is-unsigned { border-left-color: #e07a1f; background: #fffdf8; }
.checklist-today-dash-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
}
.checklist-today-dash-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
}
.checklist-today-dash-label {
    color: #897d89;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.checklist-today-dash-status {
    color: #2f242f;
    font-size: 1.2rem;
    font-weight: 820;
}
.checklist-today-dash-note {
    margin: 0;
    color: #5a505a;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.4;
}
.checklist-today-dash-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.checklist-today-dash-metrics > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 5px 11px;
    color: #564a56;
    background: #f6f2f6;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 650;
}
.checklist-today-dash-metrics em {
    color: #2f242f;
    font-style: normal;
    font-weight: 850;
}
.checklist-today-dash-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 170px;
}
.checklist-today-dash-side .taiba-button,
.checklist-today-reopen .taiba-button {
    width: 100%;
    justify-content: center;
    text-align: center;
}
.checklist-today-reopen { margin: 0; }
.checklist-today-glance-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
}
.checklist-today-glance-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
}
.checklist-today-glance-main strong {
    color: #2f242f;
    font-size: 1.05rem;
}
.checklist-today-status {
    color: #514751;
    font-size: 0.95rem;
    font-weight: 700;
}
.checklist-today-glance-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.checklist-today-glance-metrics > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 4px 10px;
    color: #564a56;
    background: #f6f2f6;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 650;
}
.checklist-today-glance-metrics em {
    color: #2f242f;
    font-style: normal;
    font-weight: 850;
}
.checklist-today-photo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.checklist-today-photo-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 9px;
    color: #805c24;
    background: #fff8e9;
    border: 1px solid #eeddb8;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 750;
}
.checklist-today-glance-note {
    margin: 0;
    color: #8a5a12;
    font-size: 0.82rem;
    font-weight: 650;
}
.checklist-today-glance-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.checklist-contrib-body {
    padding: 0 14px 14px;
}
.checklist-contrib-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px 14px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #efe8ef;
}
.checklist-contrib-controls label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.checklist-contrib-controls label span {
    color: #776b77;
    font-size: 0.68rem;
    font-weight: 820;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.checklist-contrib-controls select {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e4dbe4;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 0.88rem;
}
.checklist-contrib-controls small {
    color: #7a6d7a;
    font-size: 0.78rem;
}
.checklist-report-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
}
.checklist-staff-perf {
    margin: 0 0 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--check-border);
    border-radius: 14px;
}
.checklist-staff-perf-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.checklist-staff-perf-head strong {
    display: block;
    color: #2f242f;
    font-size: 1.05rem;
}
.checklist-staff-perf-head small {
    display: block;
    margin-top: 4px;
    color: #7a6d7a;
    font-size: 0.82rem;
    line-height: 1.4;
}
.checklist-staff-perf-picker {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
}
.checklist-staff-perf-picker label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.checklist-staff-perf-picker label span {
    color: #776b77;
    font-size: 0.68rem;
    font-weight: 820;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.checklist-staff-perf-picker input {
    min-width: 180px;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #e4dbe4;
    border-radius: 10px;
    font: inherit;
}
.checklist-staff-perf-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.checklist-staff-perf-stats > div {
    padding: 12px;
    background: #f7f4f7;
    border-radius: 12px;
}
.checklist-staff-perf-stats strong {
    display: block;
    color: var(--check-purple);
    font-size: 1.25rem;
}
.checklist-staff-perf-stats span {
    color: #776b77;
    font-size: 0.75rem;
    font-weight: 650;
}
.checklist-staff-perf-table-wrap {
    overflow-x: auto;
}
.checklist-staff-perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.checklist-staff-perf-table th,
.checklist-staff-perf-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #efe8ef;
    text-align: left;
}
.checklist-staff-perf-table th {
    color: #776b77;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.checklist-staff-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
}
.checklist-staff-share-bar {
    display: block;
    width: 72px;
    height: 8px;
    overflow: hidden;
    background: #efe8ef;
    border-radius: 999px;
}
.checklist-staff-share-bar > span {
    display: block;
    height: 100%;
    background: var(--check-purple);
    border-radius: inherit;
}
.checklist-staff-share strong {
    color: #2f242f;
    font-size: 0.85rem;
}
@media (max-width: 760px) {
    .checklist-staff-perf-head { flex-direction: column; }
    .checklist-staff-perf-stats { grid-template-columns: 1fr 1fr; }
}
.checklist-report-tabs a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 8px 14px;
    color: #665b66;
    background: #f4f0f4;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}
.checklist-report-tabs a.is-active,
.checklist-report-tabs a:hover {
    color: #fff;
    background: var(--check-purple);
}
.checklist-report-summary > div {
    padding: 15px 14px;
    background: linear-gradient(135deg, #fff 0%, #fbf7fb 100%);
    border: 1px solid var(--check-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px -22px rgba(72, 26, 72, 0.75);
}
.checklist-report-summary strong {
    display: block;
    color: var(--check-purple);
    font-size: 1.35rem;
    font-weight: 880;
    line-height: 1;
}
.checklist-report-summary span {
    display: block;
    margin-top: 5px;
    color: #776b77;
    font-size: 0.76rem;
    font-weight: 720;
}
.checklist-report-card {
    margin-bottom: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--check-border);
    border-radius: 15px;
    box-shadow: 0 10px 28px -25px rgba(55, 26, 55, 0.85);
}
.checklist-admin-settings > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
}
.checklist-admin-settings > summary::-webkit-details-marker { display: none; }
.checklist-admin-settings-body {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}
.checklist-admin-settings-body > .checklist-report-card {
    margin-bottom: 0;
    box-shadow: none;
    background: #faf7fa;
}
.checklist-report-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.checklist-report-card-head h2 {
    margin: 0;
    color: #2f242f;
    font-size: 1.05rem;
}
.checklist-report-card-head span {
    color: #897d89;
    font-size: 0.76rem;
    font-weight: 650;
}
.checklist-report-bars,
.checklist-session-stats {
    display: grid;
    gap: 10px;
}
.checklist-report-bar-row,
.checklist-session-stat {
    display: grid;
    grid-template-columns: minmax(155px, 210px) 1fr;
    gap: 12px;
    align-items: center;
}
.checklist-report-bar-label,
.checklist-session-stat > div:first-child {
    min-width: 0;
}
.checklist-report-bar-label strong,
.checklist-session-stat strong {
    display: block;
    overflow: hidden;
    color: #372d37;
    font-size: 0.86rem;
    font-weight: 820;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-report-bar-label span,
.checklist-session-stat span {
    display: block;
    margin-top: 2px;
    color: #897d89;
    font-size: 0.72rem;
    font-weight: 650;
}
.checklist-report-bar,
.checklist-session-mini-bar {
    height: 12px;
    overflow: hidden;
    background: #f0eaf0;
    border-radius: 999px;
}
.checklist-report-bar span,
.checklist-session-mini-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--check-purple), #8b488b);
    border-radius: inherit;
}
.checklist-session-stats {
    margin: 10px 0 18px;
    padding: 12px;
    background: #fbf9fb;
    border: 1px solid #efe7ef;
    border-radius: 12px;
}
/* At-a-glance category chips */
.checklist-cat-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 14px;
}
.checklist-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    color: #275b48;
    background: #edf8f3;
    border: 1px solid #cae9dc;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 720;
}
.checklist-cat-chip .checklist-progress-ring {
    width: 28px;
    height: 28px;
}
.checklist-cat-chip .checklist-progress-ring::before { inset: 3px; background: #edf8f3; }
.checklist-cat-chip .checklist-progress-ring > span { font-size: .54rem; }
.checklist-cat-chip > i {
    display: inline-grid;
    width: 15px;
    height: 15px;
    place-items: center;
    color: #fff;
    background: #37a279;
    border-radius: 50%;
    font-size: .5rem;
}
.checklist-cat-chip strong {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    color: #1f6349;
    background: #d5efe4;
    border-radius: 999px;
    font-size: .72rem;
}
/* Collapsible category groups (closed by default so a 50-item day is scannable) */
.checklist-cat-groups { display: grid; gap: 8px; }
.checklist-cat-group {
    overflow: hidden;
    background: #fbf9fb;
    border: 1px solid #eee5ee;
    border-radius: 11px;
}
.checklist-cat-group > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 13px;
    cursor: pointer;
    list-style: none;
}
.checklist-cat-group > summary::-webkit-details-marker { display: none; }
.checklist-cat-group-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #2f242f;
    font-size: .88rem;
    font-weight: 800;
}
.checklist-cat-group-meta {
    flex: 0 0 auto;
    color: #897d89;
    font-size: .74rem;
    font-weight: 650;
}
.checklist-cat-group > summary > i {
    flex: 0 0 auto;
    color: #8b778b;
    font-size: .78rem;
    transition: transform .2s ease;
}
.checklist-cat-group > summary .checklist-progress-ring {
    width: 34px;
    height: 34px;
}
.checklist-progress-ring-session {
    width: 42px;
    height: 42px;
}
.checklist-progress-ring-session > span { font-size: .68rem; }
.checklist-history-no-items {
    color: #897d89;
    font-size: .8rem;
    font-style: italic;
}
.checklist-cat-group[open] > summary > i { transform: rotate(180deg); }
.checklist-cat-group .checklist-history-items { padding: 0 8px 10px; }
.checklist-signoff-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.checklist-signoff-setting > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}
.checklist-signoff-setting > div strong { color: #2f242f; font-size: 1rem; }
.checklist-signoff-setting > div small { color: #897d89; font-size: .74rem; line-height: 1.4; }
.checklist-signoff-setting form {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}
.checklist-signoff-setting label { position: relative; display: block; }
.checklist-signoff-setting input {
    width: 88px;
    min-height: 38px;
    padding: 7px 30px 7px 10px;
    border: 1px solid #e2d9e2;
    border-radius: 9px;
    font: inherit;
    font-weight: 750;
    box-sizing: border-box;
}
.checklist-signoff-setting label span {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #897d89;
    font-size: .75rem;
    transform: translateY(-50%);
    pointer-events: none;
}
.checklist-signoff-setting button {
    min-height: 38px;
    padding: 7px 14px;
    color: #fff;
    background: #5f255f;
    background: var(--check-purple, #5f255f);
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}
.checklist-photo-settings > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.checklist-photo-settings > summary::-webkit-details-marker { display: none; }
.checklist-photo-settings > summary > span { display: flex; flex-direction: column; gap: 3px; }
.checklist-photo-settings > summary strong { color: #2f242f; font-size: 1rem; }
.checklist-photo-settings > summary small { color: #897d89; font-size: .74rem; font-weight: 620; }
.checklist-photo-settings > summary > i { color: #8b778b; font-size: .8rem; transition: transform .2s ease; }
.checklist-photo-settings[open] > summary > i { transform: rotate(180deg); }
.checklist-photo-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 16px;
    align-items: start;
    margin-top: 12px;
}
.checklist-photo-setting-list {
    display: grid;
    gap: 5px;
    padding-top: 0;
    border-top: 0;
}
.checklist-photo-preview {
    position: sticky;
    top: 88px;
    padding: 14px;
    background: #f7f4f7;
    border: 1px solid #ebe3eb;
    border-radius: 12px;
}
.checklist-photo-preview-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
}
.checklist-photo-preview-head strong {
    color: #2f242f;
    font-size: 0.92rem;
}
.checklist-photo-preview-head small {
    color: #897d89;
    font-size: 0.76rem;
    font-weight: 620;
}
.checklist-photo-preview-list {
    display: grid;
    gap: 10px;
}
.checklist-photo-preview-card {
    display: grid;
    gap: 6px;
}
.checklist-photo-preview-cat {
    color: var(--check-purple, #5f255f);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.checklist-photo-preview-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e8dfe8;
    border-radius: 11px;
}
.checklist-photo-preview-task strong {
    display: block;
    color: #302730;
    font-size: 0.92rem;
}
.checklist-photo-preview-task small {
    display: block;
    margin-top: 3px;
    color: #8b7f8b;
    font-size: 0.78rem;
    line-height: 1.35;
}
.checklist-photo-preview-cta {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 64px;
    min-height: 48px;
    padding: 6px 8px;
    color: #fff;
    background: #16805a;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
}
.checklist-photo-preview-empty {
    margin: 0;
    color: #897d89;
    font-size: 0.84rem;
    line-height: 1.4;
}
@media (max-width: 900px) {
    .checklist-photo-settings-layout {
        grid-template-columns: 1fr;
    }
    .checklist-photo-preview { position: static; }
}
.checklist-photo-setting-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 150px;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #fbf9fb;
    border-radius: 9px;
}
.checklist-photo-setting-row > strong { color: #3b313b; font-size: .84rem; }
.checklist-setting-toggle { display: inline-flex; align-items: center; gap: 7px; color: #625662; font-size: .75rem; font-weight: 720; }
.checklist-setting-toggle input { width: 18px; height: 18px; accent-color: #278663; }
.checklist-setting-minimum { display: flex; align-items: center; gap: 7px; color: #776b77; font-size: .7rem; font-weight: 720; }
.checklist-setting-minimum input {
    width: 66px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #dfd5df;
    border-radius: 8px;
    font: inherit;
}
.checklist-setting-photo-note {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    color: #776b77;
    font-size: .7rem;
    font-weight: 720;
}
.checklist-setting-photo-note span { flex: 0 0 auto; }
.checklist-setting-photo-note input {
    min-width: 0;
    min-height: 36px;
    flex: 1 1 auto;
    padding: 7px 9px;
    border: 1px solid #dfd5df;
    border-radius: 8px;
    font: inherit;
    font-size: .78rem;
}
.checklist-photo-setting-row button {
    grid-column: 4;
    grid-row: 2;
    min-height: 36px;
    padding: 7px 10px;
    color: #fff;
    background: var(--check-purple);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}
.checklist-photo-save-bar {
    position: sticky;
    bottom: 8px;
    display: flex;
    z-index: 5;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
    padding: 11px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e5dce5;
    border-radius: 11px;
    box-shadow: 0 12px 28px -22px rgba(58, 27, 58, .8);
}
.checklist-photo-save-bar span {
    flex: 1 1 auto;
    color: #6f636f;
    font-size: .76rem;
    font-weight: 700;
}
.checklist-photo-save-bar span.is-success { color: #267356; }
.checklist-photo-save-bar span.is-error { color: #a13f35; }
.checklist-photo-save-bar button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    color: #fff;
    background: var(--check-purple);
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: .8rem;
    font-weight: 850;
    cursor: pointer;
}
.checklist-photo-save-bar button:disabled { opacity: .62; cursor: wait; }
.checklist-cat-chip em {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #267356;
    font-size: .66rem;
    font-style: normal;
}
.checklist-cat-chip em.is-missing { color: #a16c16; }
.checklist-cat-chip.is-gap {
    background: #fff8e9;
    border-color: #eeddb8;
}
.checklist-history-photo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 0 8px 10px;
}
.checklist-history-photo-grid figure { min-width: 0; margin: 0; }
.checklist-history-photo-grid a {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8eeeb;
    border-radius: 9px;
}
.checklist-history-photo-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.checklist-history-photo-grid figcaption {
    margin-top: 4px;
    overflow: hidden;
    color: #7b707b;
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checklist-history-photo-missing {
    margin: 0 8px 10px;
    padding: 9px 10px;
    color: #916416;
    background: #fff8e5;
    border: 1px solid #efdfad;
    border-radius: 8px;
    font-size: .74rem;
    font-weight: 700;
}
.checklist-history-photo-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0 8px 10px;
    padding: 8px 10px;
    color: #554a3a;
    background: #fffaf0;
    border: 1px solid #eadfc9;
    border-radius: 8px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.4;
}
.checklist-history-photo-note i { flex: 0 0 auto; margin-top: 2px; color: #9a752d; }
.checklist-weight-manager > summary,
.checklist-task-manager > summary,
.checklist-audit-card > summary,
.checklist-contrib-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.checklist-weight-manager > summary::-webkit-details-marker,
.checklist-task-manager > summary::-webkit-details-marker,
.checklist-audit-card > summary::-webkit-details-marker,
.checklist-contrib-card > summary::-webkit-details-marker { display: none; }
.checklist-weight-manager > summary > span,
.checklist-task-manager > summary > span,
.checklist-audit-card > summary > span,
.checklist-contrib-card > summary > span { display: flex; flex-direction: column; gap: 3px; }
.checklist-weight-manager > summary strong,
.checklist-task-manager > summary strong,
.checklist-audit-card > summary strong,
.checklist-contrib-card > summary strong { color: #2f242f; font-size: 1rem; }
.checklist-weight-manager > summary small,
.checklist-task-manager > summary small,
.checklist-audit-card > summary small,
.checklist-contrib-card > summary small { color: #897d89; font-size: .74rem; font-weight: 620; }
.checklist-weight-manager > summary > i,
.checklist-task-manager > summary > i,
.checklist-audit-card > summary > i,
.checklist-contrib-card > summary > i {
    color: #8b778b;
    font-size: .8rem;
    transition: transform .2s ease;
}
.checklist-weight-manager[open] > summary > i,
.checklist-task-manager[open] > summary > i,
.checklist-audit-card[open] > summary > i,
.checklist-contrib-card[open] > summary > i { transform: rotate(180deg); }
.checklist-weight-list,
.checklist-task-list,
.checklist-audit-list { margin-top: 15px; border-top: 1px solid #f0eaf0; padding-top: 10px; }
.checklist-task-add {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 90px auto;
    gap: 8px;
    align-items: end;
    margin-top: 14px;
}
.checklist-task-add label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.checklist-task-add label span {
    color: #897d89;
    font-size: .7rem;
    font-weight: 750;
}
.checklist-task-add input {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #e2d9e2;
    border-radius: 9px;
    font: inherit;
    box-sizing: border-box;
}
.checklist-task-add button,
.checklist-task-row button {
    min-height: 38px;
    padding: 7px 12px;
    color: #fff;
    background: #5f255f;
    background: var(--check-purple, #5f255f);
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}
.checklist-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3eef3;
}
.checklist-task-row.is-inactive {
    opacity: 0.72;
    background: #faf7fa;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 8px;
}
.checklist-task-edit {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}
.checklist-task-edit input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid #e2d9e2;
    border-radius: 8px;
    font: inherit;
    font-size: .84rem;
    box-sizing: border-box;
}
.checklist-task-row button.is-ghost,
.checklist-task-move button {
    color: #5f255f;
    background: #f4eef4;
}
.checklist-task-row button.is-danger {
    color: #fff;
    background: #b42318;
}
.checklist-task-move {
    display: inline-flex;
    gap: 4px;
}
.checklist-task-move button {
    min-width: 34px;
    padding: 7px 8px;
}
.checklist-task-inactive-badge {
    color: #897d89;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
@media (max-width: 820px) {
    .checklist-task-add {
        grid-template-columns: 1fr;
    }
    .checklist-task-row {
        grid-template-columns: 1fr;
    }
    .checklist-task-move { justify-content: flex-start; }
}
.checklist-weight-category {
    margin: 12px 0 5px;
    color: var(--check-purple);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.checklist-weight-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 64px;
    gap: 8px;
    align-items: center;
    padding: 7px 8px;
    background: #fbf9fb;
    border-radius: 9px;
}
.checklist-weight-row + .checklist-weight-row { margin-top: 4px; }
.checklist-weight-row > span { min-width: 0; color: #3b313b; font-size: .84rem; font-weight: 680; }
.checklist-weight-row label { position: relative; display: block; }
.checklist-weight-row input[type="number"] {
    width: 100%;
    min-height: 36px;
    padding: 7px 38px 7px 9px;
    border: 1px solid #dfd5df;
    border-radius: 8px;
    font: inherit;
    font-size: .82rem;
    box-sizing: border-box;
}
.checklist-weight-row label small {
    position: absolute;
    top: 50%;
    right: 8px;
    color: #8a7d8a;
    font-size: .66rem;
    transform: translateY(-50%);
}
.checklist-weight-row button,
.checklist-signoff-form button {
    min-height: 36px;
    padding: 7px 10px;
    color: #fff;
    background: var(--check-purple);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}
.checklist-weight-row button:hover,
.checklist-signoff-form button:hover { background: var(--check-purple-dark); }
.checklist-row-save-status {
    grid-column: 1 / -1;
    color: #6f636f;
    font-size: .69rem;
    font-weight: 700;
}
.checklist-row-save-status:empty { display: none; }
.checklist-row-save-status.is-success { color: #267356; }
.checklist-row-save-status.is-error { color: #a13f35; }
.checklist-audit-list { display: grid; gap: 7px; }
.checklist-audit-event {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 11px;
    background: #fbf9fb;
    border: 1px solid #efe8ef;
    border-radius: 10px;
}
.checklist-audit-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #fff;
    background: #8b728b;
    border-radius: 50%;
    font-size: .7rem;
}
.checklist-audit-event.is-completed .checklist-audit-icon,
.checklist-audit-event.is-signed_off .checklist-audit-icon { background: #278663; }
.checklist-audit-event.is-reopened_task .checklist-audit-icon,
.checklist-audit-event.is-reopened_checklist .checklist-audit-icon { background: #c08335; }
.checklist-audit-event > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.checklist-audit-event strong { color: #3a303a; font-size: .82rem; }
.checklist-audit-event span,
.checklist-audit-event small { color: #857985; font-size: .71rem; line-height: 1.35; }
.checklist-signoff-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    color: #176047;
    background: #e9f7f1;
    border: 1px solid #cae9dc;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 820;
}
.checklist-signoff-badge.is-pending { color: #805c24; background: #fff8e9; border-color: #eeddb8; }
.checklist-signoff-badge.is-override { color: #9a3412; background: #fdeee4; border-color: #f3cba8; }
.checklist-signoff-panel {
    margin: 12px 0 18px;
    padding: 12px;
    background: #fbf9fb;
    border: 1px solid #eee5ee;
    border-radius: 12px;
}
.checklist-signoff-record { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #216b50; }
.checklist-signoff-record > i { font-size: 1.25rem; }
.checklist-signoff-record span { display: flex; flex-direction: column; gap: 2px; }
.checklist-signoff-record strong { color: #275b48; font-size: .85rem; }
.checklist-signoff-record small { color: #6d827a; font-size: .71rem; }
.checklist-signoff-record.is-pending { color: #95612d; }
.checklist-signoff-record.is-pending strong { color: #6f4f20; }
.checklist-signoff-record.is-pending small { color: #8d7655; }
.checklist-signoff-record.is-override { color: #9a3412; }
.checklist-signoff-record.is-override strong { color: #7c2d12; }
.checklist-signoff-record.is-override small { color: #a35b3a; }
.checklist-signoff-form { display: flex; gap: 8px; align-items: center; }
.checklist-signoff-form input[type="text"] {
    min-width: 0;
    flex: 1 1 auto;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #dfd5df;
    border-radius: 8px;
    font: inherit;
    font-size: .8rem;
}
.checklist-signoff-form button.is-secondary { color: #7b3c34; background: #fae9e6; }
.checklist-signoff-form button:disabled { opacity: .45; cursor: not-allowed; }
.checklist-signoff-help { display: block; margin-top: 7px; color: #95612d; font-size: .7rem; }
@media (max-width: 980px) {
    .checklist-report-filters { grid-template-columns: 1fr 1fr; }
    .checklist-report-filters label:first-child { grid-column: 1 / -1; }
    .checklist-report-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    .checklist-report-actions button,
    .checklist-report-actions a {
        flex: 1 1 0;
    }
}
@media (max-width: 560px) {
    .checklist-history .checklist-hero { display: block; }
    .checklist-history-back { margin-top: 12px; }
    .checklist-history-session > summary { flex-wrap: wrap; }
    /* Only session <summary> — day-row also uses summary-side; width:100% crushed the text column */
    .checklist-history-session > summary .checklist-history-summary-side {
        width: 100%;
        justify-content: flex-start;
    }
    .checklist-history-day-row {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .checklist-history-day-row .checklist-history-summary-main {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: 100%;
    }
    .checklist-history-day-row .checklist-history-summary-side {
        flex: 0 0 auto;
        width: auto;
    }
    .checklist-history-day-row .checklist-history-title {
        overflow-wrap: normal;
        word-break: normal;
    }
    .checklist-history-items li { flex-wrap: wrap; gap: 4px; }
    .checklist-history-item-meta { flex-basis: 100%; text-align: left; padding-left: 29px; }
    .checklist-report-filters { grid-template-columns: 1fr; }
    .checklist-report-filters label:first-child { grid-column: auto; }
    .checklist-report-summary { grid-template-columns: 1fr 1fr; }
    .checklist-today-glance {
        align-items: stretch;
        flex-direction: column;
    }
    .checklist-today-glance-side {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .checklist-today-dash {
        align-items: stretch;
        flex-direction: column;
    }
    .checklist-today-dash-side {
        min-width: 0;
        width: 100%;
    }
    .checklist-report-card-head { display: block; }
    .checklist-report-card-head span { display: block; margin-top: 4px; }
    .checklist-report-bar-row,
    .checklist-session-stat { grid-template-columns: 1fr; gap: 7px; }
    .checklist-weight-row { grid-template-columns: minmax(0, 1fr) 92px 56px; }
    .checklist-signoff-form { align-items: stretch; flex-direction: column; }
    .checklist-signoff-setting { align-items: stretch; flex-direction: column; }
    .checklist-signoff-setting form { justify-content: flex-end; }
    .checklist-photo-setting-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .checklist-setting-minimum { grid-column: 1 / 2; }
    .checklist-photo-setting-row button { grid-column: 2 / 3; grid-row: 2; }
    .checklist-setting-photo-note {
        grid-column: 1 / -1;
        grid-row: 3;
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
    }
    .checklist-photo-save-bar { align-items: stretch; flex-direction: column; }
    .checklist-photo-save-bar button { width: 100%; }
    .checklist-history-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   STAFF HOW-TO (first visit) — Training + Checklist
   ============================================================ */
.staff-howto {
    margin: 0 0 16px;
}
.staff-howto[hidden] { display: none !important; }
.staff-howto-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 18px 16px;
    border: 1px solid #e4d6e4;
    border-radius: 16px;
    background: linear-gradient(135deg, #fffaf5 0%, #f8f1f8 100%);
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}
.staff-howto-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #5f255f;
    color: #fff;
    font-size: 1.1rem;
}
.staff-howto-body { min-width: 0; flex: 1; }
.staff-howto-body h2 {
    margin: 0 0 8px;
    color: #3d1840;
    font-size: 1.05rem;
}
.staff-howto-body ul {
    margin: 0 0 14px;
    padding: 0 0 0 1.1rem;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}
.staff-howto-body li { margin: 0 0 6px; }
.staff-howto-dismiss {
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: #5f255f;
    color: #fff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}
.staff-howto-dismiss:hover { background: #4a1c4a; }
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Training: toolbar, people view, what's next */
.training-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 14px;
}
.training-search {
    position: relative;
    display: block;
}
.training-search i {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #9ca3af;
    transform: translateY(-50%);
    pointer-events: none;
}
.training-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px 10px 36px;
    border: 1px solid #ddd3dd;
    border-radius: 11px;
    background: #fff;
    color: #342734;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
}
.training-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #e5dde5;
    border-radius: 11px;
    background: #fff;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.training-filter-check input { width: 16px; height: 16px; accent-color: #5f255f; }
.training-mode-tabs {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #e5dde5;
    border-radius: 11px;
    background: #f7f4f7;
}
.training-mode-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b556b;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.training-mode-tabs button.is-active {
    background: #fff;
    color: #5f255f;
    box-shadow: 0 2px 8px rgba(58, 32, 58, 0.1);
    transform: scale(1.02);
}
.training-mode-tabs button:active {
    transform: scale(0.97);
}
.training-people-list {
    display: grid;
    gap: 10px;
}
.training-person-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #e9e2e9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.04);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.training-person-card:hover {
    border-color: #d4bdd4;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(95, 37, 95, 0.08);
}
.training-person-card:active {
    transform: translateY(0) scale(0.995);
}
@media (prefers-reduced-motion: reduce) {
    .training-mode-tabs button.is-active,
    .training-mode-tabs button:active,
    .training-person-card:hover,
    .training-person-card:active {
        transform: none;
    }
}
.training-person-card-main strong {
    display: block;
    color: #342734;
    font-size: 1rem;
}
.training-person-card-main span {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
}
.training-person-card-progress {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}
.training-person-card > .fa-chevron-right {
    color: #c4b4c4;
    font-size: 0.85rem;
}
.training-progress-ring {
    --progress: 0;
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#5f255f calc(var(--progress) * 1%), #ebe4eb 0);
    transition: background 0.35s ease;
}
.training-progress-ring::before {
    position: absolute;
    inset: 5px;
    background: #fff;
    border-radius: inherit;
    content: "";
}
.training-progress-ring > span {
    position: relative;
    z-index: 1;
    color: #514651;
    font-size: 0.62rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.02em;
}
.training-progress-ring.is-complete {
    background: #10B981;
}
.training-progress-ring.is-complete > span { color: #047857; }
.training-progress-ring.is-card {
    width: 52px;
    height: 52px;
}
.training-progress-ring.is-card > span { font-size: 0.66rem; }
.training-progress-ring.is-summary {
    width: 72px;
    height: 72px;
}
.training-progress-ring.is-summary::before { inset: 7px; }
.training-progress-ring.is-summary > span { font-size: 0.82rem; }
.training-progress-ring.is-matrix {
    width: 36px;
    height: 36px;
}
.training-progress-ring.is-matrix::before { inset: 4px; }
.training-progress-ring.is-matrix > span { font-size: 0.52rem; }
.training-staff-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.training-staff-name-copy {
    min-width: 0;
}
.training-staff-name-copy .training-staff-name {
    margin-bottom: 2px;
}
.training-staff-name-copy .training-staff-pct {
    margin-top: 0;
}
.training-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border: 1px solid #e5dde5;
    border-radius: 10px;
    background: #fff;
    color: #5f255f;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}
.training-back-btn:hover { background: #f8f4f8; }
.training-person-detail .training-personal-summary p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 0.82rem;
}
.training-person-action .training-toggle-btn {
    min-width: 132px;
}
.training-toggle-btn.is-list span { font-size: 0.74rem; }
.training-item-meta {
    display: block;
    margin-top: 2px;
    color: #9ca3af;
    font-size: 0.69rem;
    font-weight: 600;
}
.training-staff-pct {
    display: block;
    margin-top: 2px;
    color: #5f255f;
    font-size: 0.72rem;
    font-weight: 800;
}
.training-whats-next {
    margin: 0 0 16px;
    padding: 18px 20px;
    border: 1px solid #e8d9a8;
    border-radius: 14px;
    background: #fffbeb;
}
.training-whats-next h2 {
    margin: 0 0 4px;
    color: #3d1840;
    font-size: 1rem;
}
.training-whats-next > p {
    margin: 0 0 10px;
    color: #7c5a12;
    font-size: 0.86rem;
}
.training-whats-next ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: next;
}
.training-whats-next li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(197, 160, 89, 0.28);
    counter-increment: next;
}
.training-whats-next li::before {
    content: counter(next) ".";
    color: #c5a059;
    font-weight: 800;
    margin-right: 4px;
}
.training-whats-next li strong { color: #342734; font-size: 0.88rem; }
.training-whats-next li span { color: #9a7b2e; font-size: 0.72rem; font-weight: 700; }
.training-whats-next-more {
    margin: 10px 0 0 !important;
    color: #6b7280 !important;
    font-size: 0.78rem !important;
}
.training-whats-next.is-done {
    border-color: #a7f3d0;
    background: #ecfdf5;
}
.training-whats-next.is-done > p { color: #047857; margin: 0; }

@media (max-width: 760px) {
    .staff-howto-card { padding: 16px; }
    .training-toolbar {
        grid-template-columns: 1fr;
    }
    .training-filter-check,
    .training-mode-tabs { width: 100%; }
    .training-mode-tabs button { flex: 1; justify-content: center; }
    .training-person-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "ring main chevron"
            "ring progress chevron";
        gap: 8px 12px;
    }
    .training-person-card .training-progress-ring { grid-area: ring; }
    .training-person-card-main { grid-area: main; }
    .training-person-card-progress { grid-area: progress; }
    .training-person-card > .fa-chevron-right { grid-area: chevron; }
    .training-person-action .training-toggle-btn { min-width: 0; width: 100%; }
    .training-personal-card li {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon copy"
            "action action";
    }
    .training-personal-card li .training-item-icon { grid-area: icon; }
    .training-personal-card li > span:nth-child(2) { grid-area: copy; }
    .training-personal-card li .training-person-action,
    .training-personal-card li .training-status-badge { grid-area: action; margin-top: 6px; }
}

/* ============================================================
   STAFF TRAINING (root stafftraining.php) — modern grid
   ============================================================ */
.training-shell { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
@media (max-width: 760px) {
    .training-shell { padding-left: 6px; padding-right: 6px; }
}
.training-intro {
    text-align: center;
    margin-bottom: 22px;
}
.training-intro h1 {
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 6px;
}
.training-intro p { color: #6b7280; font-size: 0.9rem; }
.training-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 600;
}
.training-legend span { display: inline-flex; align-items: center; gap: 6px; }
.training-legend .swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.training-legend .swatch-trained { background: #10B981; }
.training-legend .swatch-untrained { background: #E5E7EB; border: 1px solid #d1d5db; }

.training-card { margin-bottom: 20px; }
.training-card .modern-table td { text-align: center; }
.training-card .modern-table td:first-child { text-align: left; font-weight: 700; }
.training-card .modern-table td.modern-th:first-child { text-align: left; }

/* Training toggle cell states */
.modern-table td.training-cell { padding: 8px; cursor: default; }
.training-toggle-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s ease, box-shadow 0.12s ease;
}
.modern-table tr:hover td.training-cell.is-trained,
.training-cell.is-trained { background: #ECFDF5 !important; }
.modern-table tr:hover td.training-cell.is-untrained,
.training-cell.is-untrained { background: #fff !important; }
.training-cell.is-trained .training-toggle-btn {
    background: #10B981;
    color: #fff;
    border-color: #059669;
}
.training-cell.is-trained .training-toggle-btn:hover { background: #059669; }
.training-cell.is-untrained .training-toggle-btn {
    background: #F3F4F6;
    color: #6b7280;
    border-color: #E5E7EB;
}
.training-cell.is-untrained .training-toggle-btn:hover { background: #E5E7EB; color: #374151; }
.training-toggle-btn:disabled { opacity: 0.6; cursor: default; }
.training-cell .training-static {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 800;
}
.training-cell.is-trained .training-static { background: #10B981; color: #fff; }
.training-cell.is-untrained .training-static { background: #E5E7EB; color: #9ca3af; }

/* Live training application */
.training-app {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 18px 48px;
    color: #1f2937;
}
.training-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 16px;
    padding: 0;
    color: var(--stone-800);
}
.training-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--stone-500);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.training-hero h1 {
    margin: 0;
    color: #3d1840;
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.65rem;
}
.training-hero p {
    max-width: 630px;
    margin: 6px 0 0;
    color: var(--stone-500);
    font-size: 0.92rem;
    line-height: 1.55;
}
.training-hero-side {
    display: flex;
    min-width: max-content;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.training-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 800;
}
.training-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.14);
}
.training-app.is-syncing .training-live-dot { background: #fcd34d; }
.training-app.is-offline .training-live-dot { background: #fca5a5; }
.training-setup-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.training-setup-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.training-view-switch {
    display: inline-flex;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 11px;
    background: rgba(25, 8, 25, 0.18);
}
.training-view-switch button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}
.training-view-switch button.is-active {
    background: #fff;
    color: #5f255f;
    box-shadow: 0 2px 9px rgba(20, 5, 20, 0.2);
}
.training-preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #e8d9a8;
    border-radius: 10px;
    background: #fffbeb;
    color: #7c5a12;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
}
.training-preview-banner i { margin-top: 2px; color: #c5a059; }
.training-preview-banner strong { color: #5f255f; }
.training-notice {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 1300;
    width: calc(100% - 28px);
    max-width: 420px;
    margin: 0;
    padding: 12px 15px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(20, 5, 20, 0.18);
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}
.training-notice[hidden] { display: none; }
.training-notice.is-success { border: 1px solid #a7f3d0; background: #ecfdf5; color: #047857; }
.training-notice.is-error { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.training-loading {
    display: flex;
    min-height: 210px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #6b7280;
    font-size: 0.9rem;
}
.training-loading[hidden] { display: none; }
.training-loading span:not(.training-spinner) { color: #9ca3af; }
.training-loading button {
    padding: 9px 16px;
    border: 0;
    border-radius: 8px;
    background: #5f255f;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.training-spinner {
    width: 25px;
    height: 25px;
    border: 3px solid #eaddea;
    border-top-color: #5f255f;
    border-radius: 50%;
    animation: training-spin 0.75s linear infinite;
}
@keyframes training-spin { to { transform: rotate(360deg); } }
.training-manager-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.training-manager-summary article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #eee7ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(31, 41, 55, 0.05);
}
.training-manager-summary span { color: #6b7280; font-size: 0.78rem; font-weight: 700; }
.training-manager-summary strong { color: #5f255f; font-size: 1.55rem; line-height: 1; }
.training-table-card {
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid #e9e2e9;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(31, 41, 55, 0.055);
}
.training-table-card > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 20px;
    border-bottom: 1px solid #eee8ee;
}
.training-table-card > header span {
    display: block;
    margin-bottom: 3px;
    color: #9b7b9b;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.training-table-card > header h2 { margin: 0; color: #3b253b; font-size: 1.05rem; }
.training-table-card > header small { color: #9ca3af; font-size: 0.72rem; }
.training-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.training-table { width: 100%; min-width: 790px; border-collapse: collapse; }
.training-table th,
.training-table td {
    padding: 10px;
    border-bottom: 1px solid #f0edf0;
    text-align: center;
    vertical-align: middle;
}
.training-table thead th {
    background: #faf8fa;
    color: #6b556b;
    font-size: 0.71rem;
    font-weight: 800;
    white-space: nowrap;
}
.training-table thead th:first-child,
.training-table tbody th { position: sticky; left: 0; z-index: 2; min-width: 200px; text-align: left; }
.training-table thead th:first-child { z-index: 3; }
.training-table tbody th { background: #fff; }
.training-table tbody tr:last-child th,
.training-table tbody tr:last-child td { border-bottom: 0; }
.training-staff-name {
    display: block;
    overflow: hidden;
    margin-bottom: 6px;
    color: #342734;
    font-size: 0.82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.training-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.training-progress {
    display: flex;
    align-items: center;
    gap: 16px;
}
.training-progress-body { flex: 1; min-width: 0; }
.training-progress-copy strong { color: #342734; font-size: 0.88rem; }
.training-progress-copy span { color: #5f255f; font-size: 0.82rem; font-weight: 800; }
.training-progress-track {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: #eee9ee;
}
.training-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5f255f, #c5a059);
    transition: width 0.3s ease;
}
.training-progress p { margin: 8px 0 0; color: #6b7280; font-size: 0.78rem; }
.training-progress.is-compact { gap: 10px; }
.training-progress.is-compact .training-progress-copy { margin-bottom: 5px; }
.training-progress.is-compact .training-progress-copy strong { color: #6b7280; font-size: 0.7rem; }
.training-progress.is-compact .training-progress-copy span { font-size: 0.68rem; }
.training-progress.is-compact .training-progress-track { height: 5px; }
.training-table td.training-cell { min-width: 104px; padding: 8px; }
.training-table .training-cell.is-trained { background: #f0fdf7 !important; }
.training-table .training-cell.is-untrained { background: #fff !important; }
.training-toggle-btn {
    min-height: 36px;
    white-space: nowrap;
}
.training-toggle-btn.is-saving { color: transparent !important; position: relative; }
.training-toggle-btn.is-saving::after {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: #fff;
    border-radius: 50%;
    content: "";
    animation: training-spin 0.7s linear infinite;
}
.training-cell.is-untrained .training-toggle-btn.is-saving::after,
.training-toggle-btn.is-untrained.is-saving::after {
    border-color: #d1d5db;
    border-top-color: #5f255f;
}
/* Standalone button colouring (used by the mobile item lists) */
.training-toggle-btn.is-trained {
    background: #10B981;
    color: #fff;
    border-color: #059669;
}
.training-toggle-btn.is-trained:hover { background: #059669; }
.training-toggle-btn.is-untrained {
    background: #F3F4F6;
    color: #6b7280;
    border-color: #E5E7EB;
}
.training-toggle-btn.is-untrained:hover { background: #E5E7EB; color: #374151; }

/* Admin staff-view picker */
.training-staff-picker {
    display: grid;
    gap: 7px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid #e9e2e9;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(31, 41, 55, 0.04);
}
.training-staff-picker span {
    color: #795f79;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.training-staff-picker select {
    width: 100%;
    min-height: 44px;
    padding: 9px 38px 9px 11px;
    border: 1px solid #dcd2dc;
    border-radius: 9px;
    background: #faf8fa;
    color: #342734;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
}
.training-personal-summary {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr);
    align-items: center;
    gap: 32px;
    margin-bottom: 16px;
    padding: 24px 26px;
    border: 1px solid #e9e2e9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(31, 41, 55, 0.055);
}
.training-manager-own {
    border-color: #d9c4d9;
    background: linear-gradient(135deg, #fff8ff 0%, #f7f0f7 100%);
}
.training-personal-summary > div > span {
    display: block;
    margin-bottom: 4px;
    color: #9b7b9b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.training-personal-summary h2 { margin: 0; color: #342734; font-size: 1.3rem; }
.training-personal-summary .training-progress-copy strong { font-size: 1rem; }
.training-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 18px;
    padding: 5px;
    border: 1px solid #e8e1e8;
    border-radius: 13px;
    background: #f8f6f8;
}
.training-tabs button {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 11px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #776777;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}
.training-tabs button strong {
    min-width: 25px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #e8e1e8;
    color: #5f255f;
    text-align: center;
}
.training-tabs button.is-active {
    background: #fff;
    color: #5f255f;
    box-shadow: 0 3px 12px rgba(58, 32, 58, 0.1);
}
.training-personal-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}
.training-personal-card {
    overflow: hidden;
    border: 1px solid #e9e3e9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(31, 41, 55, 0.045);
}
.training-personal-card h3 {
    margin: 0;
    padding: 14px 17px;
    border-bottom: 1px solid #eee9ee;
    color: #4c344c;
    font-size: 0.9rem;
}
.training-personal-card ul { margin: 0; padding: 0; list-style: none; }
.training-personal-card li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 11px;
    padding: 13px 16px;
    border-bottom: 1px solid #f1eef1;
}
.training-personal-card li:last-child { border-bottom: 0; }
.training-personal-card li strong { display: block; color: #342b34; font-size: 0.81rem; }
.training-personal-card li small { display: block; margin-top: 2px; color: #9ca3af; font-size: 0.69rem; }
.training-item-icon {
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 0.73rem;
}
.training-item-icon.is-trained { background: #d1fae5; color: #047857; }
.training-item-icon.is-remaining { background: #f1eaf1; color: #5f255f; }
.training-status-badge {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
}
.training-status-badge.is-trained { background: #d1fae5; color: #047857; }
.training-status-badge.is-remaining { background: #f3f4f6; color: #6b7280; }
.training-empty {
    margin: 20px 0;
    padding: 42px 22px;
    border: 1px dashed #d9cfd9;
    border-radius: 15px;
    background: #fff;
    color: #6b7280;
    text-align: center;
}
.training-empty > i { margin-bottom: 12px; color: #9b739b; font-size: 1.8rem; }
.training-empty h2 { margin: 0 0 6px; color: #3f333f; font-size: 1.05rem; }
.training-empty p { margin: 0; font-size: 0.82rem; }
.training-empty.is-success > i { color: #c5a059; }
.training-access-error {
    max-width: 600px;
    margin: 60px auto;
    padding: 30px;
    text-align: center;
}
.training-logout { margin: 4px 0 50px; text-align: center; }
.training-logout .btn-modern {
    border: 1px solid #5f255f;
    background: #fff;
    color: #5f255f;
}

/* "Swipe to see all" hint — only useful on touch/narrow screens */
/* Confirm modal */
.training-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.training-modal[hidden] { display: none; }
.training-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 10, 28, 0.55);
    backdrop-filter: blur(2px);
    animation: training-fade 0.16s ease;
}
.training-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 26px 24px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(20, 5, 20, 0.35);
    text-align: center;
    animation: training-pop 0.18s ease;
}
.training-modal-icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    font-size: 1.25rem;
}
.training-modal-card h2 { margin: 0 0 8px; color: #2c1f2c; font-size: 1.2rem; }
.training-modal-card p { margin: 0 0 22px; color: #6b7280; font-size: 0.9rem; line-height: 1.55; }
.training-modal-actions { display: flex; gap: 10px; }
.training-modal-btn {
    flex: 1;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}
.training-modal-btn.is-ghost { background: #f3f4f6; border-color: #e5e7eb; color: #374151; }
.training-modal-btn.is-ghost:hover { background: #e5e7eb; }
.training-modal-btn.is-danger { background: #dc2626; color: #fff; }
.training-modal-btn.is-danger:hover { background: #b91c1c; }
body.training-modal-open { overflow: hidden; }
@keyframes training-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes training-pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
    .training-app { padding: 12px 6px 34px; }
    .training-hero { flex-direction: column; }
    .training-hero h1 { font-size: 1.4rem; }
    .training-hero-side { width: 100%; align-items: stretch; }
    .training-live { align-self: flex-start; }
    .training-view-switch { width: 100%; }
    .training-view-switch button { flex: 1; justify-content: center; }
    .training-manager-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
    .training-manager-summary article { flex-direction: column; align-items: flex-start; gap: 4px; padding: 13px 14px; }
    .training-manager-summary article:first-child { grid-column: 1 / -1; }
    .training-manager-summary strong { font-size: 1.35rem; }
    .training-table-card > header { align-items: flex-start; flex-direction: column; gap: 4px; }
    /* Fit the whole matrix in the viewport instead of scrolling sideways */
    .training-table-wrap { overflow-x: visible; }
    .training-table { min-width: 0; width: 100%; table-layout: fixed; }
    .training-table thead th {
        padding: 7px 4px;
        font-size: 0.62rem;
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
        vertical-align: bottom;
    }
    .training-table th, .training-table td { padding: 7px 4px; }
    .training-table thead th:first-child,
    .training-table tbody th { min-width: 0; width: 30%; }
    .training-table td.training-cell { min-width: 0; padding: 5px 4px; }
    .training-table .training-toggle-btn { min-width: 0; width: 100%; padding: 8px 4px; }
    .training-staff-name { white-space: normal; font-size: 0.78rem; }
    .training-staff-name-row { gap: 8px; }
    .training-progress-ring.is-matrix {
        width: 30px;
        height: 30px;
    }
    .training-progress-ring.is-matrix::before { inset: 3px; }
    .training-progress-ring.is-matrix > span { font-size: 0.46rem; }
    .training-personal-summary { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
    .training-personal-groups { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .training-hero { padding: 18px 15px; }
    .training-tabs button { padding: 10px 9px; }
    .training-tabs button i { display: none; }
    .training-personal-card li { padding: 12px; }
    .training-status-badge { display: none; }
    .training-table thead th { font-size: 0.56rem; }
    .training-table thead th:first-child,
    .training-table tbody th { width: 34%; }
    .training-staff-name { font-size: 0.72rem; }
    /* Icon-only toggles so five columns fit a phone without scrolling */
    .training-table .training-toggle-btn { font-size: 0; gap: 0; padding: 9px 0; }
    .training-table .training-toggle-btn i { font-size: 0.9rem; }
    .training-table .training-progress.is-compact .training-progress-copy span { display: none; }
    .training-modal-card { padding: 22px 18px 18px; }
    .training-modal-actions { flex-direction: column-reverse; }
}

/* ============================================================
   SHIFTS PAGE (Stafftimings.php) — purple card headers to match
   the Orders / Checklist / Training tabs
   ============================================================ */
.staff-shifts-page { max-width: 1100px; }
.staff-shifts-page .taiba-card-head {
    background: #5F255F;
    color: #fff;
    border-bottom: 2px solid #C5A059;
}
.staff-shifts-page .taiba-card-head .last-update-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
/* Keep it purple even when a hovered row/element sits under the header */
.staff-shifts-page .taiba-card:hover > .taiba-card-head { background: #5F255F; color: #fff; }

/* Flatten "card inside a card" — form groups sit directly on the dashboard
   card with no inner box; whitespace + headings provide the separation. */
.staff-shifts-page .form-box {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 18px;
}
.staff-shifts-page .tool-section { padding-bottom: 22px; margin-bottom: 22px; }

/* Page context and status */
.shifts-page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 28px;
    padding: 24px 26px;
    color: #fff;
    background: linear-gradient(135deg, #4C1E4C 0%, #753975 100%);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(95, 37, 95, 0.16);
}
.shifts-page-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #E5C585;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.shifts-page-intro h1 {
    margin: 0 0 4px;
    color: #fff;
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.75rem;
}
.shifts-page-intro p { margin: 0; color: rgba(255,255,255,.78); font-size: .9rem; }
.shifts-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}
.shifts-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d1d5db;
    box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.shifts-status.is-on .shifts-status-dot { background: #6ee7b7; }

/* Clear hierarchy between personal and management work */
.shifts-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 34px 2px 14px;
}
.shifts-section-heading:first-of-type { margin-top: 0; }
.shifts-section-heading span {
    display: block;
    margin-bottom: 2px;
    color: #C5A059;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.shifts-section-heading h2 {
    margin: 0;
    color: #3d1840;
    font-family: var(--font-body), 'Manrope', system-ui, sans-serif;
    font-size: 1.45rem;
}
.shifts-section-heading p { margin: 0 0 2px; color: #6b7280; font-size: .85rem; }

/* Manager workspace: one focused panel at a time */
.shifts-workspace-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px;
    background: #f5f0f5;
    border: 1px solid #eadfea;
    border-radius: 12px;
}
.shifts-workspace-tabs button {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    color: #5F255F;
    background: transparent;
    font-family: var(--font-body);
    font-size: .86rem;
    font-weight: 750;
    cursor: pointer;
}
.shifts-workspace-tabs button:hover { background: #eadfea; }
.shifts-workspace-tabs button.is-active {
    color: #fff;
    background: #5F255F;
    box-shadow: 0 3px 10px rgba(95,37,95,.22);
}
.shift-admin-panel:not(.is-active) { display: none; }

@media (max-width: 640px) {
    .shifts-page-intro {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }
    .shifts-page-intro h1 { font-size: 1.5rem; }
    .shifts-section-heading { display: block; margin-top: 28px; }
    .shifts-section-heading p { margin-top: 5px; }
    .shifts-workspace-tabs { gap: 4px; padding: 5px; }
    .shifts-workspace-tabs button {
        flex-direction: column;
        gap: 3px;
        min-height: 54px;
        padding: 7px 4px;
        font-size: .7rem;
    }
}

/* ============================================================
   RESPONSIVE TABLES — stack into cards on mobile (no side-scroll)
   Add class "resp-table" to a .modern-table and data-label to each <td>.
   Breakpoint is generous (820px) because these tables can have up to 9
   columns, which are unreadable on large phones and small tablets too.
   ============================================================ */
@media (max-width: 820px) {
    .modern-table-wrap.resp-wrap,
    .modern-table-wrap:has(.resp-table) { overflow: visible !important; }

    /* Table + body collapse to plain blocks; header row is hidden */
    .modern-table.resp-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse !important;
    }
    .modern-table.resp-table thead { display: none !important; }
    .modern-table.resp-table tbody { display: block !important; width: 100% !important; }

    /* Each row is a card. Using FLEX (not table-row) guarantees the cells
       stack vertically even if their table display isn't overridden.
       height:auto guards against any leftover fixed-height table-row rules. */
    .modern-table.resp-table tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 0 16px !important;
        border: 1px solid #e3d7e1 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #fff !important;
        box-shadow: 0 6px 16px -10px rgba(95, 37, 95, 0.4) !important;
        box-sizing: border-box !important;
    }

    /* Cells: label above value, full width, always readable */
    .modern-table.resp-table td {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        text-align: left !important;
        padding: 11px 14px !important;
        border: none !important;
        border-bottom: 1px solid #f3f4f6 !important;
        font-size: 0.95rem !important;
        line-height: 1.45 !important;
        word-break: break-word;
        overflow-wrap: anywhere;
        white-space: normal !important;
        box-sizing: border-box !important;
    }
    .modern-table.resp-table td:last-child { border-bottom: none !important; }
    .modern-table.resp-table td::before {
        content: attr(data-label);
        display: block !important;
        margin-bottom: 3px;
        font-weight: 700;
        font-size: 0.68rem;
        letter-spacing: 0.03em;
        color: #8a6d8a;
        text-transform: uppercase;
    }

    /* Named tables: first cell becomes a purple title strip */
    .modern-table.resp-table--named td:first-child {
        background: #5F255F !important;
        font-weight: 800;
        color: #fff !important;
        font-size: 1.02rem;
        padding: 12px 14px !important;
    }
    .modern-table.resp-table--named td:first-child::before { content: "" !important; display: none !important; }
    .modern-table.resp-table--named td:first-child a { color: #fff !important; text-decoration: underline; }

    /* Availability: days flow into a compact 2-column grid inside the card */
    .modern-table.resp-table--avail tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0 !important;
    }
    .modern-table.resp-table--avail td { border-bottom: 1px solid #f3f4f6 !important; }
    .modern-table.resp-table--avail td[data-label="Name"],
    .modern-table.resp-table--avail td[data-label="Last Updated"] {
        grid-column: 1 / -1 !important;
    }

    /* Staff availability update form: day + time on one row, no side-scroll */
    .modern-table.resp-table--avail-form tr {
        display: grid !important;
        grid-template-columns: minmax(88px, 34%) 1fr !important;
        align-items: center !important;
        gap: 0 !important;
        margin: 0 0 10px !important;
        padding: 0 !important;
    }
    .modern-table.resp-table--avail-form td {
        border-bottom: none !important;
        padding: 12px 14px !important;
    }
    .modern-table.resp-table--avail-form td::before { display: none !important; }
    .modern-table.resp-table--avail-form td:first-child {
        background: #f9fafb !important;
        font-weight: 800;
        color: #5F255F !important;
    }
    .modern-table.resp-table--avail-form select.modern-input,
    .modern-table.resp-table--avail-form .modern-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .modern-table.resp-table--avail-form td[data-label="Available from"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px;
    }

    /* Selection rows (appeal radios) shouldn't collapse into a pill */
    .modern-table.resp-table td label {
        display: flex !important;
        justify-content: flex-start !important;
        flex-wrap: wrap;
        width: 100%;
    }
    .modern-table.resp-table .badge-strike,
    .modern-table.resp-table .badge-status {
        white-space: normal;
        max-width: 100%;
    }
}

/* ============================================================
   MATRIX TABLE — staff down the left, days across the top.
   Stays a real grid at every size; scrolls sideways on small screens
   with the name column pinned so rows stay identifiable.
   ============================================================ */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.modern-table.modern-table--matrix { min-width: 660px; }
.modern-table.modern-table--matrix td,
.modern-table.modern-table--matrix th {
    padding: 10px 12px;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
}
.modern-table.modern-table--matrix th.modern-th {
    background: #5F255F;
    color: #fff;
    font-weight: 700;
}
/* Pinned first column (staff names) */
.modern-table.modern-table--matrix td:first-child,
.modern-table.modern-table--matrix th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    font-weight: 700;
    background: #fff;
    box-shadow: 1px 0 0 #eee;
}
.modern-table.modern-table--matrix th.modern-th:first-child {
    background: #5F255F;
    z-index: 2;
}