.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: var(--header-height);
    background: var(--header-bg);
    box-shadow: 0 1px 0 var(--header-border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.5rem);
    height: 100%;
}

.brand-group {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.5rem, 1.2vw, 0.9rem);
    flex-shrink: 0;
}

.brand-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary);
    background: rgba(229, 27, 35, 0.08);
    border: 1px solid rgba(229, 27, 35, 0.26);
    border-radius: 9999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-install-btn .icon {
    width: 0.85rem;
    height: 0.85rem;
    stroke-width: 2.2;
}

.brand-install-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(229, 27, 35, 0.3);
    transform: translateY(-1px);
}

.brand-install-btn:active {
    transform: scale(0.95) !important;
}

.brand-install-btn.is-installed {
    color: #0b7a34;
    background: rgba(11, 122, 52, 0.08);
    border-color: rgba(11, 122, 52, 0.25);
}

.brand-install-btn.is-installed:hover {
    background: #0b7a34;
    border-color: #0b7a34;
    color: #ffffff;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    color: var(--color-primary);
    font-weight: 900;
    font-style: italic;
    line-height: 0.88;
    letter-spacing: -0.08em;
    white-space: nowrap;
}

.brand-mark {
    font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.brand-mark > span {
    margin-left: 0.15em;
    font-size: 0.42em;
    letter-spacing: -0.03em;
}

.brand-logo {
    display: block;
    width: clamp(6.4rem, 8vw, 7.5rem);
    height: auto;
}

.brand-location {
    margin-top: 0.32rem;
    color: var(--color-text);
    font-size: 0.7rem;
    font-style: normal;
    letter-spacing: 0.08em;
}

.primary-navigation {
    margin-left: auto;
}

.primary-navigation ul {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 1.7vw, 1.65rem);
}

.nav-link {
    position: relative;
    display: inline-block;
    padding-block: 0.65rem;
    color: var(--color-text);
    font-size: 0.89rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color var(--transition);
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: 0.25rem;
    left: 0;
    height: 2px;
    content: '';
    background: var(--color-primary);
    border-radius: var(--radius-pill);
    transform: scaleX(0);
    transition: transform var(--transition);
}

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

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 2.75rem;
    padding: 0.68rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.1;
    text-align: center;
    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.button:hover {
    box-shadow: var(--shadow-small);
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.button-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.button-whatsapp {
    color: #fff;
    background: var(--color-whatsapp);
    border-color: var(--color-whatsapp);
}

.button-whatsapp:hover {
    background: var(--color-whatsapp-dark);
    border-color: var(--color-whatsapp-dark);
}

.button-outline {
    color: var(--color-primary);
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: 0 2px 8px rgb(0 0 0 / 5%);
}

.button-outline:hover {
    border-color: var(--color-primary);
}

.button-small {
    width: 100%;
    min-height: 2.4rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

.header-cta {
    flex: 0 0 auto;
    min-height: 2.55rem;
    padding-inline: 1rem;
    box-shadow: 0 0.3rem 0.8rem rgb(229 27 35 / 18%);
}

.icon-button {
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.theme-switcher {
    position: relative;
}

.theme-toggle-btn {
    width: 2.55rem;
    height: 2.55rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--color-primary);
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.theme-active-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 120;
    display: none;
    min-width: 10.5rem;
    padding: 0.35rem;
    margin: 0;
    list-style: none;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    animation: themeMenuFade 140ms ease;
}

.theme-dropdown.is-open {
    display: block;
}

@keyframes themeMenuFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-text);
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    user-select: none;
    transition:
        background var(--transition),
        color var(--transition);
}

.theme-menu-item:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}

.theme-menu-item.is-active {
    color: var(--color-primary);
    background: var(--color-primary-soft);
    font-weight: 700;
}

.theme-menu-item .icon {
    width: 1.05rem;
    height: 1.05rem;
}

.nav-theme-group {
    display: none;
}

.menu-toggle {
    display: none;
    width: 2.55rem;
    height: 2.55rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.menu-toggle:hover {
    color: var(--color-primary);
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.menu-toggle .icon {
    width: 1.45rem;
    height: 1.45rem;
}

.menu-close-icon,
.menu-toggle[aria-expanded='true'] .menu-open-icon {
    display: none;
}

.menu-toggle[aria-expanded='true'] .menu-close-icon {
    display: block;
}

.hero {
    position: relative;
    overflow: hidden;
    background: var(--color-background);
}

.hero-image {
    width: 100%;
    height: auto;
}

@media (min-width: 60rem) {
    .hero {
        height: min(45.68vw, max(32rem, calc(100vh - var(--header-height) - 7rem)));
    }

    @supports (height: 100svh) {
        .hero {
            height: min(45.68vw, max(32rem, calc(100svh - var(--header-height) - 7rem)));
        }
    }

    .hero-image {
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }
}

/* Hero Install Compact Flex Banner */
/* Hero Install Compact Flex Banner (Mobile only; Tablet & Desktop use minimalist header button) */
.hero-install-banner {
    display: none;
    position: relative;
    z-index: 5;
    margin-top: clamp(-5.5rem, -5.8vw, -3.6rem);
    margin-bottom: 0.85rem;
}

.hero-install-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.85rem 1.35rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4.5px solid var(--color-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-install-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.8rem 2.4rem rgb(0 0 0 / 12%);
}

.hero-install-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.hero-install-platforms {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.hero-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
}

.hero-platform-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hero-install-info {
    min-width: 0;
}

.hero-install-title {
    font-size: 1.02rem;
    font-weight: 750;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.hero-install-quote {
    font-size: 0.84rem;
    color: var(--color-muted);
    margin: 0.2rem 0 0;
    line-height: 1.35;
}

.hero-install-right {
    flex-shrink: 0;
}

.hero-install-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 750;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.hero-install-cta-btn .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.hero-install-cta-btn.is-installed {
    background: #0b7a34 !important;
    border-color: #075f29 !important;
    box-shadow: 0 4px 12px rgba(11, 122, 52, 0.25) !important;
}

.quick-info {
    position: relative;
    z-index: 4;
    margin-top: clamp(-5.5rem, -5.8vw, -3.6rem);
}


.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 1.35rem 0.55rem;
    background: var(--quickinfo-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.info-card {
    display: grid;
    grid-template-columns: 2.9rem minmax(0, 1fr);
    gap: 0.8rem;
    min-width: 0;
    padding: 0.5rem 1.1rem;
    border-right: 1px solid var(--color-border);
}

.info-card:last-child {
    border-right: 0;
}

.info-card-icon {
    display: grid;
    place-items: start center;
    padding-top: 0.2rem;
}

.info-card-icon .icon {
    width: 2.45rem;
    height: 2.45rem;
    stroke-width: 1.8;
}

.whatsapp-logo-icon {
    display: block;
    width: 2.45rem;
    height: 2.45rem;
    object-fit: contain;
}

.info-card-icon-red {
    color: var(--color-primary);
}

.info-card-icon-green {
    color: var(--color-whatsapp);
}

.info-card-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.info-card h2 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    line-height: 1.2;
}

.info-card p {
    margin-bottom: 0.55rem;
    color: var(--color-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.info-card p + p {
    margin-top: auto;
}

.contact-card-phone {
    font-weight: 750;
}

.contact-card-label,
.contact-card-number {
    display: block;
}

.contact-card-number {
    margin-top: 0.05rem;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.015em;
    white-space: nowrap;
}

.info-card .button {
    margin-top: auto;
}

.section {
    padding-block: 3.75rem;
}

.section-heading {
    margin-bottom: 2rem;
    text-align: center;
}

.section-heading h2,
.panel-heading h2 {
    position: relative;
    margin-bottom: 0;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.2;
}

.section-heading h2::after,
.panel-heading h2::after {
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-top: 0.6rem;
    content: '';
    background: var(--color-primary);
    border-radius: var(--radius-pill);
}

.section-heading h2::after {
    margin-inline: auto;
}

.section-eyebrow {
    margin-bottom: 0.35rem;
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.services-section {
    padding-top: 2.4rem;
    padding-bottom: 2.1rem;
    background: var(--color-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.service-card {
    position: relative;
    padding: 0.85rem 0.65rem 0.45rem;
    text-align: center;
}

.service-card:not(:last-child)::after {
    position: absolute;
    top: 12%;
    right: 0;
    width: 1px;
    height: 76%;
    content: '';
    background: var(--color-border);
}

.service-icon {
    margin-bottom: 0.7rem;
    color: var(--color-primary);
}

.service-icon .icon {
    width: 3.2rem;
    height: 3.2rem;
    stroke-width: 1.55;
}

.service-card h3,
.service-card p {
    margin-bottom: 0.1rem;
    font-size: 0.88rem;
    line-height: 1.3;
}

.service-card h3 {
    font-weight: 800;
}

.service-card p {
    color: var(--color-muted);
    font-weight: 650;
}

.pickup-section {
    padding-top: 1.2rem;
    padding-bottom: 2rem;
    background: var(--color-background);
}

.pickup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.panel {
    overflow: hidden;
    padding: clamp(1.25rem, 2.4vw, 2rem);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-small);
}

.panel-heading {
    margin-bottom: 1.25rem;
}

.panel-heading h2 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.pickup-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.field-group {
    grid-column: span 3;
}

.field-group:nth-of-type(n + 5) {
    grid-column: span 2;
}

.field-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--color-text);
    font-size: 0.83rem;
    font-weight: 650;
}

.field-group label span {
    color: var(--color-primary);
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.67rem 0.8rem;
    color: var(--color-text);
    background: var(--color-background);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-sm);
    outline: none;
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.field-group textarea {
    min-height: 4rem;
    resize: vertical;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
    color: #888e99;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    background: var(--color-surface);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.input-with-icon {
    position: relative;
}

.input-with-icon > .icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    color: var(--color-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.input-with-icon input {
    padding-right: 2.5rem;
}

.pickup-submit {
    grid-column: 1 / -1;
    min-height: 2.85rem;
    margin-top: 0.1rem;
}

.pickup-submit.is-submitting,
.pickup-submit:disabled {
    background: #52525b;
    border-color: #52525b;
    color: #f4f4f5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.9;
}

.pickup-fallback {
    grid-column: 1 / -1;
    margin: 0.15rem 0 0;
    text-align: center;
    font-size: 0.85rem;
}

.pickup-fallback-text {
    margin: 0;
    color: var(--color-muted);
}

.pickup-fallback-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.pickup-fallback-link:hover,
.pickup-fallback-link:focus-visible {
    color: #60a5fa;
    text-decoration: underline;
}

.form-note {
    grid-column: 1 / -1;
    margin: -0.2rem 0 0;
    color: var(--color-muted);
    font-size: 0.72rem;
    text-align: center;
}

.reasons-panel {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding-bottom: 0;
}

.advantages-list {
    display: grid;
    gap: 0.65rem;
}

.advantages-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.92rem;
    font-weight: 580;
}

.advantages-list li > span {
    display: grid;
    width: 1.3rem;
    height: 1.3rem;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: var(--color-primary);
    border-radius: 50%;
}

.advantages-list .icon {
    width: 0.9rem;
    height: 0.9rem;
    stroke-width: 2.7;
}

.fleet-image {
    width: calc(100% + 2rem);
    max-width: none;
    margin: auto -1rem 0;
    object-fit: contain;
    object-position: bottom center;
}

.testimonials-section {
    padding-top: 0.6rem;
    padding-bottom: 2.8rem;
    background: var(--color-surface);
}

.testimonials-section .section-heading {
    margin-bottom: 1.5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.testimonial-card {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1.2rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-small);
}

.avatar {
    display: grid;
    width: 4rem;
    height: 4rem;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #333, #777);
    border: 4px solid var(--color-border);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 850;
}

.avatar-2 {
    background: linear-gradient(145deg, #9a5542, #e3a38e);
}

.avatar-3 {
    background: linear-gradient(145deg, #284f75, #6ca7d7);
}

.testimonial-card blockquote {
    margin-bottom: 0.55rem;
    color: var(--color-text);
    font-size: 0.86rem;
    line-height: 1.5;
}

.testimonial-author {
    margin-bottom: 0.35rem;
    color: var(--color-text);
    font-size: 0.79rem;
    font-weight: 800;
}

.rating {
    display: flex;
    gap: 0.12rem;
    color: #ffb400;
}

.rating .icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    stroke: currentColor;
}

.site-footer {
    color: #f1f1f1;
    background: var(--color-footer);
}

.footer-grid {
    display: grid;
    grid-template-columns:
        minmax(15rem, 1.4fr) minmax(8rem, 0.7fr) minmax(9rem, 0.8fr)
        minmax(18rem, 1.4fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding-block: 2.7rem 2.2rem;
}

.brand-footer {
    align-items: flex-start;
    color: #ff4b50;
}

.brand-footer .brand-location {
    color: #fff;
}

.footer-about > p {
    max-width: 20rem;
    margin-bottom: 1rem;
    color: #d6d6d6;
    font-size: 0.8rem;
    line-height: 1.55;
}

.footer-about .footer-tagline {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 650;
}

.social-links {
    display: flex;
    gap: 0.65rem;
}

.social-links a {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: #fff;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 50%;
    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.social-links a:hover {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.social-links .icon {
    width: 1rem;
    height: 1rem;
}

.footer-column h2 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-column ul {
    display: grid;
    gap: 0.55rem;
}

.footer-column li,
.footer-column a {
    color: #d6d6d6;
    font-size: 0.78rem;
    line-height: 1.5;
}

.footer-column a:hover {
    color: #fff;
}

.footer-contact li {
    display: grid;
    grid-template-columns: 1.2rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
}

.footer-contact .icon {
    margin-top: 0.12rem;
}

.footer-bottom {
    padding-block: 1rem;
    border-top: 1px solid rgb(255 255 255 / 10%);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: #cfcfcf;
    font-size: 0.78rem;
}

.whatsapp-fab {
    position: fixed;
    z-index: 90;
    right: var(--whatsapp-fab-offset);
    bottom: var(--whatsapp-fab-offset);
    display: grid;
    width: var(--whatsapp-fab-size);
    height: var(--whatsapp-fab-size);
    place-items: center;
    color: #fff;
    background: var(--color-whatsapp);
    border: 4px solid var(--color-surface);
    border-radius: 50%;
    box-shadow: 0 0.6rem 1.5rem rgb(0 0 0 / 22%);
    font-size: 0.62rem;
    font-weight: 750;
    line-height: 1.1;
    text-align: center;
    transition:
        background var(--transition),
        transform var(--transition);
}

.whatsapp-fab:hover {
    background: var(--color-whatsapp-dark);
    transform: translateY(-3px);
}

.whatsapp-fab-logo {
    display: block;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0.16rem;
    margin-bottom: -0.55rem;
    background: #fff;
    border-radius: 50%;
}

.back-to-top {
    position: fixed;
    z-index: 89;
    right: calc(
        var(--whatsapp-fab-offset) + ((var(--whatsapp-fab-size) - var(--back-to-top-size)) / 2)
    );
    bottom: 7rem;
    width: var(--back-to-top-size);
    height: var(--back-to-top-size);
    color: #fff;
    background: var(--color-footer);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    box-shadow: var(--shadow-small);
    transition:
        opacity var(--transition),
        transform var(--transition);
}

.back-to-top[hidden] {
    display: none;
}

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

/* PWA Install UI & Offline Indicator */
.pwa-install-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border: 1px solid rgba(229, 27, 35, 0.2);
    transition: all var(--transition);
}

.pwa-install-header-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}



@media (max-width: 991px) {
    .pwa-install-header-btn {
        display: none !important;
    }
}

/* iOS PWA Install Modal */
.pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pwa-modal-backdrop[hidden] {
    display: none !important;
}

.pwa-modal-card {
    width: 100%;
    max-width: 380px;
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-large);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: pwaSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pwa-modal-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.pwa-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: var(--shadow-small);
}

.pwa-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    color: var(--color-text);
}

.pwa-modal-subtitle {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0.2rem 0 0 0;
}

.pwa-modal-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pwa-modal-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--color-text);
}

.pwa-modal-steps .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.pwa-modal-close {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Offline Indicator Toast */
.offline-indicator {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 999px;
    background: #f59e0b;
    color: #ffffff;
    box-shadow: var(--shadow-medium);
}

.offline-indicator[hidden] {
    display: none !important;
}

.offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   PWA Installation UI & Platform Badges
   ========================================================================== */

/* General Button Secondary Contrast Fix */
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.68rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
}

html[data-theme="dark"] .button-secondary {
    color: #ffffff !important;
    background: #1e2430 !important;
    border: 1px solid #3b4555 !important;
}

html[data-theme="light"] .button-secondary {
    color: #14171d !important;
    background: #f1f3f7 !important;
    border: 1px solid #cbd5e1 !important;
}

.button-secondary:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* Footer PWA Bar */
.footer-pwa-bar {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-top: 1px solid var(--color-border);
}

.footer-pwa-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-pwa-header {
    max-width: 640px;
    margin: 0 auto 1.5rem;
}

.footer-pwa-kicker {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.footer-pwa-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 0.5rem;
}

.footer-pwa-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Badges row */
.footer-pwa-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
}

/* Modern App Store style badge button */
.pwa-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 1.15rem;
    background: #14171d;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    min-width: 170px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease, background 0.18s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html[data-theme="light"] .pwa-badge-btn {
    background: #0f1217;
    border-color: #262c36;
    color: #ffffff;
}

.pwa-badge-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    background: #1c2028;
}

.pwa-badge-btn:active {
    transform: translateY(0);
}

.pwa-badge-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.pwa-apple-logo {
    filter: brightness(0) invert(1);
}

.pwa-badge-text {
    display: flex;
    flex-direction: column;
}

.pwa-badge-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    line-height: 1.1;
}

.pwa-badge-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

/* Installed Button Badge Style */
.pwa-badge-btn.is-installed {
    border-color: #059669;
    background: #0d1f18;
}

.pwa-badge-btn.is-installed .pwa-badge-sub {
    color: #34d399;
    font-weight: 600;
}

html[data-theme="light"] .pwa-badge-btn.is-installed {
    background: #f0fdf4;
    border-color: #86efac;
}

html[data-theme="light"] .pwa-badge-btn.is-installed .pwa-badge-name {
    color: #065f46;
}

html[data-theme="light"] .pwa-badge-btn.is-installed .pwa-badge-sub {
    color: #16a34a;
}

/* ==========================================================================
   PWA Bottom Sheet / Responsive Modal
   ========================================================================== */

.pwa-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s ease;
}

.pwa-sheet-backdrop[hidden] {
    display: none !important;
}

.pwa-sheet-card {
    background: var(--color-surface);
    color: var(--color-text);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 1rem 1.25rem 2rem;
    border: 1px solid var(--color-border);
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    animation: pwaSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* On desktop, center the card */
@media (min-width: 641px) {
    .pwa-sheet-backdrop {
        align-items: center;
        padding: 1.5rem;
    }

    .pwa-sheet-card {
        border-radius: 20px;
        border: 1px solid var(--color-border);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
        padding: 1.75rem 2rem;
        animation: pwaPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes pwaPopIn {
        from {
            transform: scale(0.96);
            opacity: 0;
        }
        to {
            transform: scale(1);
            opacity: 1;
        }
    }
}

/* Touch drag handle for mobile */
.pwa-sheet-handle {
    width: 44px;
    height: 5px;
    background: var(--color-border);
    border-radius: 999px;
    margin: 0 auto 0.15rem;
}

@media (min-width: 641px) {
    .pwa-sheet-handle {
        display: none;
    }
}

/* Navigation bar in sheet */
.pwa-sheet-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.pwa-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-heading);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    cursor: pointer;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.pwa-back-link:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.pwa-back-link svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.pwa-sheet-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.pwa-sheet-close-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-heading);
}

.pwa-sheet-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pwa-platform-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

html[data-theme="light"] .pwa-sheet-brand .pwa-apple-logo {
    filter: brightness(0);
}

.pwa-sheet-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 0.15rem;
}

.pwa-sheet-subtitle {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Step list */
.pwa-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pwa-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.pwa-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.pwa-step-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    line-height: 1.45;
}

.pwa-step-content strong {
    color: var(--color-heading);
    font-weight: 600;
}

.pwa-step-content span {
    color: var(--color-text-muted);
}

/* Desktop Sheet Specifics */
.pwa-sheet-desktop {
    max-width: 560px;
}

/* Direct install card */
.pwa-desktop-direct-card {
    padding: 1.15rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pwa-direct-info strong {
    display: block;
    font-size: 0.92rem;
    color: var(--color-heading);
    margin-bottom: 0.2rem;
}

.pwa-direct-info span {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* Mobile visitor tip with high contrast button */
.pwa-mobile-tip {
    padding: 0.9rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pwa-tip-content strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-heading);
}

.pwa-tip-content span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.pwa-copy-btn {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 0.95rem;
    min-height: 2.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

html[data-theme="dark"] .pwa-copy-btn {
    color: #ffffff !important;
    background: #252b37 !important;
    border: 1px solid #3d4758 !important;
}

html[data-theme="light"] .pwa-copy-btn {
    color: #111827 !important;
    background: #e5e7eb !important;
    border: 1px solid #cbd5e1 !important;
}

.pwa-copy-btn:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

.pwa-copy-btn.button-success {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

/* Segmented OS switcher tabs with clear active indicators */
.pwa-tab-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--color-bg);
    padding: 0.3rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    gap: 0.35rem;
}

.pwa-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    position: relative;
    transition: all 0.18s ease;
}

html[data-theme="dark"] .pwa-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .pwa-tab:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.04);
}

.pwa-tab img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.pwa-tab.is-active {
    font-weight: 750;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] .pwa-tab.is-active {
    background: #1f2530;
    color: #ffffff;
    border-color: #374151;
}

html[data-theme="light"] .pwa-tab.is-active {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

/* Prominent bottom underline on active tab */
.pwa-tab.is-active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
}

/* Active panel top banner */
.pwa-panel-active-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: 8px;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    color: var(--color-heading);
}

.pwa-panel-active-header strong {
    color: var(--color-primary);
}

.pwa-tab-panel[hidden] {
    display: none !important;
}

.pwa-btn-full {
    width: 100%;
    justify-content: center;
}

/* Installed Confirmation Modal Specifics */
.pwa-sheet-confirm {
    max-width: 480px;
}

.pwa-installed-check-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #059669;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-installed-check-circle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
}

.pwa-confirm-message {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text-muted);
    margin: 0;
}

.pwa-confirm-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Android / Xiaomi Troubleshooting Callout */
.pwa-troubleshoot-box {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.95rem 1rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.pwa-troubleshoot-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.pwa-troubleshoot-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 750;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pwa-troubleshoot-badge svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2.2;
}

.pwa-troubleshoot-text {
    margin: 0 0 0.45rem;
    font-weight: 600;
    color: var(--color-heading);
}

.pwa-troubleshoot-list {
    margin: 0;
    padding-left: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--color-text-muted);
}

.pwa-troubleshoot-list li strong {
    color: var(--color-heading);
}

/* ==========================================================================
   Pickup History Dropdown & Cards (Fuzzy Search, Custom Filter & ScrollY)
   ========================================================================== */

.pickup-history-section {
    padding-top: 0;
    padding-bottom: 3.5rem;
}

.history-accordion-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: visible;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.history-accordion-card:hover {
    border-color: rgba(229, 27, 35, 0.25);
}

/* Accordion Header Toggle Trigger */
.history-toggle-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border-radius: 18px 18px 0 0;
}

.history-toggle-trigger[aria-expanded="false"] {
    border-radius: 18px;
}

.history-toggle-trigger:hover {
    background: var(--color-bg);
}

.history-toggle-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(229, 27, 35, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon-wrapper svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
}

.history-toggle-titles {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.history-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.history-main-heading {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--color-heading);
    margin: 0;
    line-height: 1.25;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    background: var(--color-bg);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.history-badge.has-items {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.history-toggle-sub {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0;
}

.history-toggle-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.history-toggle-hint {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.history-chevron-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, color 0.15s ease;
}

.history-chevron-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.history-toggle-trigger[aria-expanded="true"] .history-chevron-icon {
    transform: rotate(180deg);
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* Collapsible Body */
.history-body-container {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: historyExpand 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CRITICAL: Hidden rules must use display: none !important to never clash with flex */
.history-body-container[hidden],
.history-toolbar[hidden],
.history-filter-menu[hidden],
.history-empty-state[hidden],
.history-no-results[hidden],
.history-search-feedback[hidden],
.history-search-clear-btn[hidden] {
    display: none !important;
}

@keyframes historyExpand {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toolbar Controls */
.history-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

@media (min-width: 768px) {
    .history-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Fuzzy Search Input */
.history-search-group {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.history-search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--color-text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-search-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.history-search-input {
    width: 100%;
    min-height: 2.65rem;
    padding: 0.6rem 2.25rem 0.6rem 2.5rem;
    font-size: 0.88rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-heading);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.history-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(229, 27, 35, 0.15);
}

.history-search-clear-btn {
    position: absolute;
    right: 0.6rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    color: var(--color-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.history-search-clear-btn svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* Actions Row (Filter + Clear) */
.history-actions-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* Custom Interactive Filter Dropdown */
.history-filter-dropdown {
    position: relative;
    display: inline-block;
}

.history-filter-trigger {
    min-height: 2.65rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-heading);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.history-filter-trigger:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.history-filter-trigger[aria-expanded="true"] {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(229, 27, 35, 0.12);
}

.history-filter-chevron {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
}

.history-filter-trigger[aria-expanded="true"] .history-filter-chevron {
    transform: rotate(180deg);
}

.history-filter-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.4rem;
    margin: 0;
    list-style: none;
    z-index: 60;
    animation: historyExpand 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-filter-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-heading);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    user-select: none;
}

.history-filter-item:hover {
    background: rgba(229, 27, 35, 0.08);
    color: var(--color-primary);
}

.history-filter-item.is-selected {
    background: rgba(229, 27, 35, 0.12);
    color: var(--color-primary);
}

.history-filter-item .check-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
    opacity: 0;
    flex-shrink: 0;
}

.history-filter-item.is-selected .check-icon {
    opacity: 1;
}

/* Clear All Button */
.history-clear-btn {
    min-height: 2.65rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.82rem;
    border-radius: 10px;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.history-clear-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: #ef4444 !important;
}

.history-clear-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
}

/* Search Feedback text */
.history-search-feedback {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: -0.35rem;
}

/* Empty State and No Results State */
.history-empty-state,
.history-no-results {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.history-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(229, 27, 35, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-empty-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.history-empty-state h3,
.history-no-results h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
}

.history-empty-state p,
.history-no-results p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    max-width: 440px;
    line-height: 1.5;
    margin: 0;
}

/* Cards Grid & ScrollY rule */
.history-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .history-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ScrollY when items > 10 */
.history-cards-grid.has-scroll-y {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 6px;
    overscroll-behavior: contain;
}

.history-cards-grid.has-scroll-y::-webkit-scrollbar {
    width: 6px;
}

.history-cards-grid.has-scroll-y::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-radius: 4px;
}

.history-cards-grid.has-scroll-y::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.history-cards-grid.has-scroll-y::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Individual History Card */
.history-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: border-color var(--transition), transform 0.15s ease, box-shadow var(--transition);
}

.history-card:hover {
    border-color: rgba(229, 27, 35, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.history-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.history-card-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.history-item-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 750;
    background: rgba(229, 27, 35, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(229, 27, 35, 0.2);
}

.history-date-badge {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

.history-delete-item-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.history-delete-item-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.history-delete-item-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
}

/* Card Details Grid */
.history-card-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.history-grid-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.history-label {
    min-width: 85px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.history-val {
    color: var(--color-heading);
    word-break: break-word;
}

.history-notes-text {
    font-style: italic;
    color: var(--color-text-muted);
}

/* Card Actions Footer */
.history-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

@media (min-width: 480px) {
    .history-card-footer {
        flex-direction: row;
    }
}

.history-action-fill-btn {
    flex: 1;
    font-size: 0.78rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
}

.history-action-fill-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
}

.history-action-wa-btn {
    font-size: 0.78rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    white-space: nowrap;
    text-decoration: none;
}

.history-action-wa-btn svg {
    width: 14px;
    height: 14px;
}

/* Delete Confirm Modal Danger Button */
.history-trash-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-trash-circle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
}

.history-confirm-danger-btn {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.history-confirm-danger-btn:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* Pulse animation on form when autofilled */
@keyframes formPulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 27, 35, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(229, 27, 35, 0.25);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 27, 35, 0);
    }
}

.form-pulse-highlight {
    animation: formPulseHighlight 1.5s ease-out;
}

/* ==========================================================================
   Tactile Micro-interactions & Authentic Brand Elevation
   ========================================================================== */

/* Active scale micro-interaction (tactile / membal saat dipencet) */
button:active,
.button:active,
a.button:active,
.pwa-badge-btn:active,
.history-filter-trigger:active,
.history-toggle-trigger:active,
.theme-toggle-btn:active,
.theme-segment-btn:active,
.menu-toggle:active,
.back-to-top:active,
.whatsapp-fab:active {
    transform: scale(0.965) !important;
    transition: transform 0.08s ease !important;
}

/* Card hover micro-elevation */
.info-card,
.service-card,
.testimonial-card,
.panel,
.history-accordion-card {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}

.service-card:hover {
    transform: translateY(-2px);
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

/* Authentic J&T Red Accent on Focus and Action */
.button-primary {
    background: linear-gradient(135deg, #e51b23 0%, #c81017 100%);
    box-shadow: 0 4px 14px rgba(229, 27, 35, 0.25);
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.button-primary:hover {
    background: linear-gradient(135deg, #ff2831 0%, #d6141b 100%);
    box-shadow: 0 6px 20px rgba(229, 27, 35, 0.35);
    transform: translateY(-1px);
}

/* Form input focus polish */
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(229, 27, 35, 0.15);
    outline: none;
}
