* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.topbar {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 2000;
    background: #fff;
}

.topbarLeft {
    display: flex;
    gap: 12px;
    align-items: baseline;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.topbarRight {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}

.title {
    font-weight: 800;
}

.hint {
    color: #444;
    font-size: 14px;
}

@media (max-width: 980px) {
    .topbar {
        align-items: flex-start;
    }
    .topbarRight {
        width: 100%;
        justify-content: flex-start;
    }
}

.layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 48px);
}

.panel {
    padding: 0;
    border-right: 1px solid #e5e5e5;
    overflow: auto;
    display: flex;
    flex-direction: column;
}


/* Système d'onglets */

.panelTabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid #e5e5e5;
    background: #fafafa;
    padding: 6px;
    flex-shrink: 0;
}

.planningSummary {
    margin-top: 6px;
}

.planningMeta {
    color: #555;
}

#btnCenterMetz {
    margin-right: 10px;
}

#outingPlaces,
#outingInvites {
    width: 100%;
    min-height: 140px;
}

.panelTab {
    padding: 10px 12px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-weight: 500;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.panelTab:hover {
    color: #222;
    background: #f0f0f0;
}

.panelTab.active {
    color: #111;
    border-bottom-color: #1857c9;
    background: #fff;
}

.panelTab.lockedFeature {
    opacity: 0.6;
}

.panelTab.lockedFeature:hover {
    background: transparent;
    color: #666;
}


/* Sections de panel */

.panelSection {
    display: none;
    flex-direction: column;
    overflow: auto;
    padding: 12px;
    gap: 8px;
    flex: 1;
}

.panelSection.active {
    display: flex;
}

#map {
    width: 100%;
    height: 100%;
}

.placePin {
    background: transparent;
    border: 0;
}

.placePin span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.placePin--shop span {
    background: #6c3fb5;
}

.placePin--experience span {
    background: #0b7285;
}

.row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

button {
    padding: 10px 12px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
}

textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
    resize: vertical;
}

button.primary {
    background: #111;
    color: #fff;
    border-color: #111;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.coords,
.result {
    font-size: 14px;
    color: #222;
    line-height: 1.6;
}

.steps {
    margin-top: 10px;
}

hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 12px 0;
}

ol {
    padding-left: 18px;
}

ul {
    padding-left: 18px;
}

.block {
    margin-bottom: 10px;
    display: grid;
    gap: 6px;
}

.layerToggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 13px;
}

.layerToggles label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.authBox {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
}

.authTabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.smallBtn {
    padding: 8px 10px;
    font-size: 13px;
}

.userMenuDropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 190px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: grid;
    gap: 6px;
    z-index: 1000;
}

.userMenuDropdown button {
    text-align: left;
    width: 100%;
}

.notificationContainer {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.notificationBtn {
    position: relative;
    font-size: 18px;
}

.notificationBadge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.notificationBadge.hidden {
    display: none;
}

.notificationDropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 320px;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-rows: auto 1fr;
    z-index: 1000;
    overflow: hidden;
    display: none;
}

.notificationDropdown:not(.hidden) {
    display: grid;
}

.notificationHeader {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.notificationHeader h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.notificationHeader button {
    padding: 6px 8px;
    font-size: 12px;
}

.notificationList {
    overflow-y: auto;
    max-height: 330px;
    display: grid;
    gap: 0;
}

.notificationItem {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 4px solid #0066cc;
}

.notificationItem:last-child {
    border-bottom: none;
}

.notificationItem:hover {
    background: #f9f9f9;
}

.notificationItem.read {
    border-left-color: #ddd;
    opacity: 0.7;
}

.notificationItemType {
    font-size: 12px;
    color: #0066cc;
    font-weight: 600;
    margin-bottom: 4px;
}

.notificationItemText {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notificationItemTime {
    font-size: 11px;
    color: #999;
}

.notificationEmpty {
    padding: 24px 12px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.authForm {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.authForm input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.authDivider {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin: 2px 0 8px;
}

.googleSignInWrap {
    display: flex;
    justify-content: center;
}

.authUserLine {
    font-size: 14px;
    color: #222;
    margin-bottom: 8px;
}

select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.small {
    margin-top: 12px;
    font-size: 12px;
    color: #666;
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 6px;
}

.shopsAlongList {
    margin: 8px 0 0;
    max-height: 180px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.45;
}

.routeItem,
.favoriteItem {
    margin-bottom: 8px;
}

#routeInfoCard {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

#agentScriptInput {
    width: 100%;
}

.agentScriptEditor {
    width: 100%;
    min-height: 300px;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

.scriptConsole {
    margin: 0;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #0f172a;
    color: #d1fae5;
    min-height: 120px;
    max-height: 240px;
    /* Sous-onglets du panel scripting */
    .scriptSubTabs {
        display: flex;
        gap: 4px;
        margin-bottom: 12px;
        border-bottom: 2px solid #e0e0e0;
        padding-bottom: 0;
    }
    .scriptSubTab {
        padding: 8px 16px;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        color: #666;
        transition: all 0.2s;
        margin-bottom: -2px;
    }
    .scriptSubTab:hover {
        color: #2563eb;
        background: rgba(37, 99, 235, 0.05);
    }
    .scriptSubTab.active {
        color: #2563eb;
        border-bottom-color: #2563eb;
        background: rgba(37, 99, 235, 0.05);
    }
    .scriptTabContent {
        display: block;
    }
    .scriptTabContent.hidden {
        display: none;
    }
    /* Liste d'exemples de scripts */
    .loadExampleScript {
        display: block;
        padding: 12px;
        text-decoration: none;
        color: #1e293b;
        border-radius: 6px;
        transition: background 0.2s;
    }
    .loadExampleScript:hover {
        background: rgba(37, 99, 235, 0.08);
    }
    .loadExampleScript b {
        color: #2563eb;
        display: block;
        margin-bottom: 4px;
    }
    .loadExampleScript .small {
        color: #64748b;
        margin: 0;
    }
    overflow: auto;
    font-size: 12px;
    line-height: 1.4;
}

.markerDomWrapper {
    background: transparent;
    border: 0;
}

.customMarkerPin {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--marker-color, #3388ff);
    color: #fff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    animation: markerPulse 2.6s ease-in-out infinite;
}

.customMarkerPin:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.3);
    filter: saturate(1.15);
}

.customMarkerPin.kind-rdv {
    border-style: dashed;
}

@keyframes markerPulse {
    0% {
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    }
    50% {
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
    }
    100% {
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    }
}

.routeItemActions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.routeItemActions button,
.favoriteItem button {
    padding: 4px 8px;
    font-size: 12px;
}


/* Conteneur principal pour l'agent IA */

.agentContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}


/* Zone de messages du chat */

.agentMessages {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #fafbfc 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 240px;
}

.agentMsg {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 10px;
    border-radius: 8px;
    word-wrap: break-word;
}

.agentMsg.user {
    align-self: flex-end;
    background: #1857c9;
    color: #fff;
    max-width: 85%;
    text-align: right;
}

.agentMsg.bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    max-width: 85%;
    text-align: left;
}

.agentCard {
    min-width: 85%;
}

.agentCardTitle {
    font-weight: 700;
    margin-bottom: 6px;
}

.agentCardBody {
    font-size: 12px;
    color: #2f2f2f;
    display: grid;
    gap: 4px;
}

.agentActionList,
.agentTimeline {
    margin: 4px 0 0 16px;
    padding: 0;
    display: grid;
    gap: 4px;
}

.agentTimeline li span {
    color: #666;
    font-size: 12px;
}

.agentToolCallsList {
    margin: 4px 0 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
    list-style: none;
}

.toolCall {
    padding: 8px;
    border-radius: 4px;
    background: #f5f5f5;
    border-left: 3px solid #666;
}

.toolCall.success {
    border-left-color: #4caf50;
    background: #f1f8f4;
}

.toolCall.error {
    border-left-color: #f44336;
    background: #fef2f1;
}

.toolCallHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.toolCallStatus {
    font-weight: 700;
    font-size: 14px;
}

.toolCall.success .toolCallStatus {
    color: #4caf50;
}

.toolCall.error .toolCallStatus {
    color: #f44336;
}

.toolCallName code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.toolCallResult {
    margin-left: auto;
    font-size: 12px;
    color: #666;
}

.toolCallDetails {
    margin-top: 6px;
}

.toolCallDetails summary {
    cursor: pointer;
    font-size: 12px;
    color: #666;
    user-select: none;
}

.toolCallDetails summary:hover {
    color: #333;
}

.toolCallArgs {
    margin: 6px 0 0 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.toolCallCommonSearches {
    margin-top: 8px;
    padding: 8px;
    background: rgba(33, 150, 243, 0.05);
    border-left: 3px solid #2196F3;
    border-radius: 3px;
    font-size: 12px;
    display: grid;
    gap: 4px;
}

.toolCallCommonSearches code {
    background: rgba(33, 150, 243, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #1976D2;
}

.toolCallRouteInfo {
    margin-top: 8px;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
}

.agentInlineLink {
    color: #1857c9;
    text-decoration: underline;
    cursor: pointer;
}

.agentInlineLink:hover {
    color: #0f3e92;
}


/* Zone d'input */

.agentInputArea {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.agentFullInput {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 13px;
}

.agentFullInput:focus {
    outline: none;
    border-color: #1857c9;
    box-shadow: 0 0 0 3px rgba(24, 87, 201, 0.1);
}

.agentSendBtn {
    padding: 10px 16px;
    flex-shrink: 0;
    min-width: 90px;
}


/* Status de l'agent */

.agentStatus {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 4px;
    background: #f0f0f0;
    border-radius: 6px;
}


/* Ancien layout pour compatibility (deprecié) */

.agentRow {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

#agentInput {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.dashboardPage {
    min-height: 100vh;
    background: #f8f9fb;
}

.dashboardContainer {
    max-width: 920px;
    margin: 20px auto;
    padding: 0 16px;
}

.dashboardCard {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
    padding: 16px;
    margin-bottom: 14px;
}

.dashboardCard h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.dashboardStatus {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}

.aboutPage {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: #f6f1e8;
    color: #1b1b1b;
}

.aboutPage .topbar {
    border-bottom-color: #e7dfd4;
    background: rgba(246, 241, 232, 0.86);
    backdrop-filter: blur(6px);
}

.aboutContainer {
    max-width: 980px;
}

.aboutHero {
    position: relative;
    border-radius: 18px;
    padding: 26px;
    background: linear-gradient(135deg, #fff7e8, #f2efe9 40%, #e9f1ea 100%);
    border: 1px solid #eadfcf;
    overflow: hidden;
    margin-bottom: 16px;
}

.aboutHero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(232, 176, 86, 0.35), rgba(232, 176, 86, 0));
    transform: rotate(12deg);
}

.aboutEyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    color: #815d1d;
    font-weight: 700;
}

.aboutHero h1 {
    margin: 8px 0 10px;
    font-size: 34px;
    line-height: 1.15;
}

.aboutHero p {
    margin: 0;
    font-size: 16px;
    max-width: 640px;
    color: #2c2c2c;
}

.aboutGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.aboutCard {
    border: 1px solid #e6dccb;
    border-radius: 14px;
    background: #fffdf8;
    padding: 16px;
    box-shadow: 0 8px 18px rgba(40, 30, 15, 0.06);
}

.aboutCard h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.aboutCard p {
    margin: 0;
    font-size: 14px;
    color: #363636;
    line-height: 1.5;
}

.aboutTags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.aboutTag {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #f0e6d3;
    color: #6a4b18;
    font-weight: 600;
}

.aboutPromise {
    margin-top: 16px;
    border-radius: 14px;
    border: 1px solid #d9e5d7;
    background: #f6fbf6;
    padding: 16px;
}

.aboutPromise h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.aboutPromise ul {
    margin: 0;
    padding-left: 18px;
    color: #2d3a2f;
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .aboutGrid {
        grid-template-columns: 1fr;
    }
    .aboutHero h1 {
        font-size: 28px;
    }
}

.dashboardList {
    margin: 8px 0 0;
    padding-left: 18px;
}

.dashboardPage[data-dashboard="admin"] .adminDashboardContainer {
    max-width: 1160px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboardPage[data-dashboard="admin"] .adminCard {
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.dashboardPage[data-dashboard="admin"] .adminStatsCard {
    grid-column: 1 / -1;
}

.dashboardPage[data-dashboard="admin"] .adminCardIntro {
    margin: -2px 0 14px;
    color: #5d6472;
    font-size: 13px;
}

.dashboardPage[data-dashboard="admin"] .dashboardForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboardPage[data-dashboard="admin"] .formGroup {
    display: grid;
    gap: 6px;
}

.dashboardPage[data-dashboard="admin"] .formGroup--check {
    grid-column: 1 / -1;
}

.dashboardPage[data-dashboard="admin"] .formGroup label {
    font-size: 13px;
    color: #2f3643;
    font-weight: 600;
}

.dashboardPage[data-dashboard="admin"] .formGroup--check label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.dashboardPage[data-dashboard="admin"] .dashboardForm input {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid #d4d9e3;
    padding: 9px 11px;
    font: inherit;
}

.dashboardPage[data-dashboard="admin"] .dashboardForm select,
.dashboardPage[data-dashboard="admin"] .modalBody input {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid #d4d9e3;
    padding: 9px 11px;
    font: inherit;
}

.dashboardPage[data-dashboard="admin"] .dashboardForm input:focus {
    outline: none;
    border-color: #1857c9;
    box-shadow: 0 0 0 3px rgba(24, 87, 201, 0.1);
}

.dashboardPage[data-dashboard="admin"] .dashboardForm select:focus,
.dashboardPage[data-dashboard="admin"] .modalBody input:focus {
    outline: none;
    border-color: #1857c9;
    box-shadow: 0 0 0 3px rgba(24, 87, 201, 0.1);
}

.dashboardPage[data-dashboard="admin"] .dashboardForm input[type="checkbox"] {
    min-height: unset;
    width: auto;
    margin: 0;
}

.dashboardPage[data-dashboard="admin"] .formActions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.dashboardPage[data-dashboard="admin"] .btnPrimary {
    background: #111827;
    border: 1px solid #111827;
    color: #fff;
    font-weight: 600;
}

.dashboardPage[data-dashboard="admin"] .btnSecondary {
    background: #fff;
    border: 1px solid #cad1de;
    color: #1f2937;
    font-weight: 600;
}

.dashboardPage[data-dashboard="admin"] #adminStatsSummary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.dashboardPage[data-dashboard="admin"] #adminStatsSummary>div {
    border: 1px solid #e6e9f0;
    border-radius: 10px;
    background: #fafbfe;
    padding: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.dashboardPage[data-dashboard="admin"] .adminStatsMetaWrap {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.dashboardPage[data-dashboard="admin"] .adminStatsColumns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dashboardPage[data-dashboard="admin"] .adminStatsPanel {
    border: 1px solid #eceff5;
    border-radius: 10px;
    background: #fcfdff;
    padding: 12px;
}

.dashboardPage[data-dashboard="admin"] .adminStatsPanel h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.dashboardPage[data-dashboard="admin"] .dashboardList {
    margin: 0;
    max-height: 220px;
    overflow: auto;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .dashboardPage[data-dashboard="admin"] .adminDashboardContainer {
        grid-template-columns: 1fr;
    }
    .dashboardPage[data-dashboard="admin"] .dashboardForm,
    .dashboardPage[data-dashboard="admin"] #adminStatsSummary,
    .dashboardPage[data-dashboard="admin"] .adminStatsColumns {
        grid-template-columns: 1fr;
    }
}

.mapContextMenu {
    position: absolute;
    z-index: 1200;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    padding: 6px;
    display: grid;
    gap: 6px;
    min-width: 280px;
    max-width: 350px;
}

.mapContextMenu button {
    text-align: left;
    width: 100%;
}

.placeInfoSection {
    padding: 8px 6px;
    border-bottom: 1px solid #eee;
}

.placeInfo {
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.placeInfoItem {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 6px;
}

.placeInfoItem label {
    font-weight: 600;
    color: #666;
}

.placeInfoItem span {
    color: #333;
    word-break: break-word;
    white-space: normal;
}

.modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    padding: 16px;
}

.modalCard {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    display: grid;
    gap: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.modalHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modalHeader h3 {
    margin: 0;
    font-size: 18px;
}

.modalBody {
    display: grid;
    gap: 10px;
}

.modalFooter {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.authPromptText {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.contactList {
    display: grid;
    gap: 10px;
}

.contactCard {
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 10px;
    display: grid;
    gap: 8px;
    background: #fafafa;
}

.contactRow {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.contactActions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.merchantMuted {
    color: #555;
}

.merchantHero {
    display: flex;
    align-items: center;
    gap: 14px;
}

.merchantHeroIcon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: #fafafa;
}

.merchantInfoGrid {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.merchantQrWrap {
    margin-top: 8px;
}

.merchantQrWrap img {
    width: 170px;
    height: 170px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
}

.merchantSplitGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.merchantSplitGrid h3 {
    margin: 0 0 8px;
}

.merchantSplitGrid label {
    display: block;
    margin-bottom: 6px;
}

.merchantStatsGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.merchantStatCard {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
}

.merchantStatLabel {
    color: #666;
    font-size: 13px;
}

.merchantStatValue {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
}

.merchantTableWrap {
    overflow: auto;
}

.merchantTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.merchantTable th,
.merchantTable td {
    border-bottom: 1px solid #eee;
    padding: 8px;
    text-align: left;
    font-size: 14px;
}

.dashboardPage[data-dashboard="merchant"] .merchantDashboardContainer {
    max-width: 1160px;
}

.dashboardPage[data-dashboard="merchant"] .merchantDashboardGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboardPage[data-dashboard="merchant"] .merchantDashboardGrid>.dashboardCard {
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.dashboardPage[data-dashboard="merchant"] .merchantDashboardGrid>.dashboardCard:first-child,
.dashboardPage[data-dashboard="merchant"] .merchantDashboardGrid>.dashboardCard:last-child {
    grid-column: 1 / -1;
}

.dashboardPage[data-dashboard="merchant"] .authForm {
    gap: 10px;
}

.dashboardPage[data-dashboard="merchant"] .authForm input,
.dashboardPage[data-dashboard="merchant"] .authForm select,
.dashboardPage[data-dashboard="merchant"] .authForm textarea {
    width: 100%;
}

.dashboardPage[data-dashboard="merchant"] .row {
    flex-wrap: wrap;
    margin: 6px 0;
}

.dashboardPage[data-dashboard="merchant"] .merchantSplitGrid {
    border: 1px solid #eceff5;
    border-radius: 10px;
    padding: 10px;
    background: #fcfdff;
}

.dashboardPage[data-dashboard="merchant"] #merchantStockSoftware,
.dashboardPage[data-dashboard="merchant"] #merchantStockImportType {
    min-height: 40px;
}

.dashboardPage[data-dashboard="merchant"] .merchantStatsGrid {
    margin-top: 4px;
}

.dashboardPage[data-dashboard="merchant"] .merchantStatCard {
    background: #fcfdff;
}

.dashboardPage[data-dashboard="invite"] .inviteDashboardContainer {
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboardPage[data-dashboard="invite"] .inviteSummaryCard {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.dashboardPage[data-dashboard="invite"] .inviteAuthCard {
    margin-bottom: 0;
}

.dashboardPage[data-dashboard="invite"] .dashboardCard {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.dashboardPage[data-dashboard="invite"] .authForm input {
    width: 100%;
    min-height: 40px;
}

.dashboardPage[data-dashboard="invite"] .authForm button {
    margin-top: 4px;
}

.dashboardPage[data-dashboard="profile"] .profileDashboardContainer {
    max-width: 980px;
}

.dashboardPage[data-dashboard="profile"] .profileCard {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.dashboardPage[data-dashboard="profile"] #profileSummary {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboardPage[data-dashboard="profile"] #profileSummary>div {
    border: 1px solid #e6e9f0;
    border-radius: 10px;
    background: #fafbfe;
    padding: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.dashboardPage[data-dashboard="place"] .placeDashboardContainer {
    max-width: 980px;
}

.dashboardPage[data-dashboard="place"] .placeCard {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.dashboardPage[data-dashboard="place"] #placeAddressBlock {
    margin-top: 10px;
    border: 1px solid #eceff5;
    border-radius: 10px;
    background: #fcfdff;
    padding: 12px;
    gap: 8px;
}

.dashboardPage[data-dashboard="place"] #placeAddressBlock>div {
    line-height: 1.45;
}

.dashboardPage[data-dashboard="place"] .row {
    margin: 12px 0 8px;
    flex-wrap: wrap;
}

.dashboardPage[data-dashboard="place"] .inviteOptionsRow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboardPage[data-dashboard="place"] .invitePanel {
    display: grid;
    gap: 8px;
}

@media (max-width: 980px) {
    .dashboardPage[data-dashboard="merchant"] .merchantDashboardGrid,
    .dashboardPage[data-dashboard="invite"] .inviteDashboardContainer,
    .dashboardPage[data-dashboard="profile"] #profileSummary {
        grid-template-columns: 1fr;
    }
    .dashboardPage[data-dashboard="merchant"] .merchantStatsGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .dashboardPage[data-dashboard="merchant"] .merchantStatsGrid {
        grid-template-columns: 1fr;
    }
}


/* Landing page */

.landingPage {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #f6f2e8 0%, #f0f3f7 40%, #eef2ee 100%);
    color: #1b1b1b;
    min-height: 100vh;
}

.landingPage h1,
.landingPage h2,
.landingPage h3 {
    font-family: "Fraunces", "Times New Roman", serif;
}

.landingNav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    position: sticky;
    top: 0;
    background: rgba(246, 242, 232, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eadfd2;
    z-index: 10;
}

.landingBrand {
    display: grid;
    gap: 4px;
}

.landingLogo {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.04em;
}

.landingTagline {
    font-size: 12px;
    color: #6d5a44;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.landingLinks {
    display: flex;
    gap: 18px;
    font-size: 14px;
}

.landingLinks a {
    color: #2b2b2b;
    text-decoration: none;
    font-weight: 500;
}

.landingLinks a:hover {
    color: #8c5e21;
}

.landingCta {
    display: flex;
    gap: 10px;
}

.primaryBtn,
.secondaryBtn,
.ghostBtn {
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primaryBtn {
    background: #1b1b1b;
    color: #fff;
    border: 1px solid #1b1b1b;
}

.secondaryBtn {
    background: #fff4df;
    color: #6b4a1b;
    border: 1px solid #e5d0ad;
}

.ghostBtn {
    background: transparent;
    color: #3a3a3a;
    border: 1px solid #c9c3ba;
}

.landingMain {
    padding: 28px 24px 64px;
    max-width: 1160px;
    margin: 0 auto;
}

.landingHero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: center;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff6e1 0%, #f1f5ff 55%, #f1f7f1 100%);
    border: 1px solid #e8dfcf;
    position: relative;
    overflow: hidden;
}

.landingHeroCopy h1 {
    font-size: 42px;
    margin: 10px 0 12px;
    line-height: 1.1;
}

.landingHeroCopy p {
    font-size: 16px;
    color: #2d2d2d;
    max-width: 520px;
    line-height: 1.6;
}

.landingEyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
    color: #8c5e21;
    font-weight: 700;
}

.landingHeroActions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.landingSignals {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #5a5a5a;
}

.landingSignals span {
    background: #f3e9d5;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e6d6b8;
}

.landingHeroVisual {
    position: relative;
    min-height: 320px;
}

.landingHeroVisual .halo {
    position: absolute;
    right: 40px;
    top: 0;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(240, 167, 72, 0.35), rgba(240, 167, 72, 0));
}

.gridCard {
    position: absolute;
    top: 20px;
    left: 0;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ece2d1;
    padding: 16px;
    width: 250px;
    box-shadow: 0 16px 30px rgba(20, 18, 12, 0.08);
}

.gridTitle {
    font-weight: 600;
    margin-bottom: 10px;
}

.gridItem {
    font-size: 13px;
    color: #4a4a4a;
    margin-bottom: 6px;
}

.pulseCard {
    position: absolute;
    right: 0;
    bottom: 20px;
    background: #1b1b1b;
    color: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    animation: landingPulse 2.6s ease-in-out infinite;
}

.landingSection {
    margin-top: 48px;
    animation: landingReveal 0.6s ease both;
}

.sectionHeader {
    max-width: 720px;
    margin-bottom: 24px;
}

.sectionHeader h2 {
    font-size: 30px;
    margin: 0 0 8px;
}

.sectionHeader p {
    margin: 0;
    color: #3b3b3b;
    line-height: 1.6;
}

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

.audienceCard {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eadfd2;
    padding: 16px;
    box-shadow: 0 12px 24px rgba(20, 18, 12, 0.06);
}

.audienceCard h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.audienceCard p {
    margin: 0 0 12px;
    font-size: 14px;
    color: #3e3e3e;
    line-height: 1.55;
}

.audienceCard ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #5a5a5a;
    line-height: 1.5;
}

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

.pillar {
    background: #f9f6f0;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #eadfd2;
}

.pillarTitle {
    font-weight: 700;
    margin-bottom: 8px;
}

.pillar p {
    margin: 0;
    color: #4a4a4a;
    line-height: 1.6;
    font-size: 14px;
}

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

.commitmentCard {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #dfe6d8;
    background: #f6fbf6;
}

.commitmentCard h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.commitmentCard p {
    margin: 0;
    font-size: 14px;
    color: #374237;
}

.landingCtaSection {
    margin-top: 64px;
}

.ctaCard {
    border-radius: 22px;
    padding: 26px;
    border: 1px solid #e5d5c0;
    background: linear-gradient(130deg, #fff4e5, #e8f1ff 55%, #eef6ee 100%);
    display: grid;
    gap: 12px;
}

.ctaCard h2 {
    margin: 0;
    font-size: 28px;
}

.ctaCard p {
    margin: 0;
    color: #3a3a3a;
}

.ctaActions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@keyframes landingPulse {
    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
    }
    50% {
        transform: translateY(-6px);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.24);
    }
}

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

@media (max-width: 980px) {
    .landingNav {
        flex-direction: column;
        align-items: flex-start;
    }
    .landingHero {
        grid-template-columns: 1fr;
    }
    .landingHeroVisual {
        min-height: 260px;
    }
    .audienceGrid,
    .pillars,
    .commitmentGrid {
        grid-template-columns: 1fr;
    }
}


/* App page (map) */

.appPage {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #f6f2e8 0%, #f0f3f7 45%, #eef2ee 100%);
    color: #1b1b1b;
}

.appPage .topbar {
    background: rgba(246, 242, 232, 0.9);
    border-bottom-color: #eadfd2;
    backdrop-filter: blur(8px);
}

.appPage .title {
    font-family: "Fraunces", "Times New Roman", serif;
    letter-spacing: 0.02em;
}

.appPage .layout {
    background: #f5f0e6;
}

.appPage .panel {
    background: #fffaf1;
    border-right-color: #eadfd2;
}

.appPage .panelTabs {
    background: #f7efe1;
    border-bottom-color: #eadfd2;
}

.appPage .panelTab.active {
    border-bottom-color: #8c5e21;
}

.appPage .panelTab:hover {
    background: #efe3cf;
}

.appPage button,
.appPage select,
.appPage textarea,
.appPage input {
    border-color: #d8cbb8;
}

.appPage button.primary {
    background: #1b1b1b;
    border-color: #1b1b1b;
}

.appPage .panelSection {
    background: #fffaf1;
}

.appPage .notificationBadge {
    background: #e2691d;
}