﻿/* PrefaSol  -  Industrial Professional Theme */
:root {
    --ps-bg: #1a1d23;
    --ps-bg-card: #22262e;
    --ps-bg-sidebar: #151820;
    --ps-bg-input: #2a2f3a;
    --ps-border: #2e3340;
    --ps-orange: #f97316;
    --ps-orange-hover: #ea6c0a;
    --ps-orange-dim: rgba(249,115,22,0.15);
    --ps-text: #e8eaf0;
    --ps-text-muted: #8892a4;
    --ps-success: #22c55e;
    --ps-danger: #ef4444;
    --ps-warning: #f59e0b;
    --ps-info: #3b82f6;
}

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--ps-bg);
    color: var(--ps-text);
    height: 100%;
    margin: 0;
}

/* â”€â”€ Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background-color: var(--ps-bg-sidebar);
    border-right: 1px solid var(--ps-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


.content {
    padding: 1.5rem;
    flex: 1;
}

/* â”€â”€ Sidebar Brand â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--ps-border);
    text-decoration: none;
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: var(--ps-orange);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ps-text);
    line-height: 1.1;
}

.brand-tagline {
    font-size: 0.65rem;
    color: var(--ps-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* â”€â”€ Nav Menu â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.nav-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ps-text-muted);
    padding: 1.25rem 1.25rem 0.4rem;
    font-weight: 600;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--ps-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 0;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-item-link:hover {
    color: var(--ps-text);
    background-color: var(--ps-orange-dim);
    border-left-color: var(--ps-orange);
}

.nav-item-link.active {
    color: var(--ps-orange);
    background-color: var(--ps-orange-dim);
    border-left-color: var(--ps-orange);
    font-weight: 600;
}

.nav-item-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ps-card {
    background: var(--ps-bg-card);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 1.25rem;
}

.ps-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ps-border);
}

.ps-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ps-text);
    margin: 0;
}

/* â”€â”€ KPI Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kpi-card {
    background: var(--ps-bg-card);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--ps-orange-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon svg { color: var(--ps-orange); width: 22px; height: 22px; }
.kpi-label { font-size: 0.78rem; color: var(--ps-text-muted); margin-bottom: 0.2rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--ps-text); line-height: 1; }
.kpi-sub { font-size: 0.75rem; color: var(--ps-text-muted); margin-top: 0.25rem; }

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn-ps {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

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

.btn-ps-secondary {
    background: var(--ps-bg-input);
    color: var(--ps-text);
    border: 1px solid var(--ps-border);
}
.btn-ps-secondary:hover { border-color: var(--ps-orange); color: var(--ps-orange); }

.btn-ps-danger {
    background: rgba(239,68,68,0.15);
    color: var(--ps-danger);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-ps-danger:hover { background: var(--ps-danger); color: white; }

.btn-compact {
    font-size: 0.78rem;
    padding: 0.32rem 0.75rem;
}

/* â”€â”€ Forms â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-label { font-size: 0.82rem; color: var(--ps-text-muted); margin-bottom: 0.35rem; font-weight: 500; }

.form-control, .form-select {
    background-color: var(--ps-bg-input);
    border: 1px solid var(--ps-border);
    color: var(--ps-text);
    border-radius: 7px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}

.form-control:focus, .form-select:focus {
    background-color: var(--ps-bg-input);
    border-color: var(--ps-orange);
    color: var(--ps-text);
    box-shadow: 0 0 0 3px var(--ps-orange-dim);
    outline: none;
}

.form-control::placeholder { color: var(--ps-text-muted); }
.form-select option { background: var(--ps-bg-input); }

textarea.form-control {
    field-sizing: content;
    min-height: 80px;
    resize: vertical;
}

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ps-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ps-table th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ps-text-muted);
    border-bottom: 1px solid var(--ps-border);
    font-weight: 600;
}
.ps-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ps-border);
    color: var(--ps-text);
    vertical-align: middle;
}
.ps-table tbody tr:hover { background: var(--ps-orange-dim); }
.ps-table tbody tr:last-child td { border-bottom: none; }

/* â”€â”€ Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge-ps {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}
.badge-orange { background: var(--ps-orange-dim); color: var(--ps-orange); }
.badge-green  { background: rgba(34,197,94,0.15); color: var(--ps-success); }
.badge-blue   { background: rgba(59,130,246,0.15); color: var(--ps-info); }
.badge-red    { background: rgba(239,68,68,0.15); color: var(--ps-danger); }
.badge-gray   { background: rgba(136,146,164,0.15); color: var(--ps-text-muted); }

/* â”€â”€ Page header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--ps-text); margin: 0; }
.page-subtitle { font-size: 0.82rem; color: var(--ps-text-muted); margin-top: 0.2rem; }

/* â”€â”€ Layout utilities â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Multiple action buttons in a page header */
.page-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Filter / search bar above tables */
.ps-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Scrollable table wrapper (used when ps-card:has(.ps-table) isn't enough) */
.ps-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Two-column dashboard / content grid */
.ps-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(249,115,22,0.13), rgba(59,130,246,0.07) 55%, rgba(255,255,255,0.02));
}

.dashboard-kicker {
    margin: 0 0 0.25rem;
    color: var(--ps-orange);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    background: var(--ps-bg-card);
    color: var(--ps-text);
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.quick-action-card:hover {
    transform: translateY(-1px);
    border-color: rgba(249,115,22,0.55);
    background: rgba(249,115,22,0.08);
    color: var(--ps-text);
}

.quick-action-card span:last-child {
    color: var(--ps-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.quick-action-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--ps-orange-dim);
    color: var(--ps-orange);
    font-size: 0.72rem;
    font-weight: 800;
}

.dashboard-work-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-subtitle {
    margin: 0.25rem 0 0;
    color: var(--ps-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.timeline-list,
.work-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.timeline-item,
.work-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 9px;
    background: rgba(255,255,255,0.02);
    color: var(--ps-text);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.timeline-item:hover,
.work-row:hover {
    border-color: rgba(249,115,22,0.42);
    background: rgba(249,115,22,0.07);
    color: var(--ps-text);
}

.timeline-date {
    min-width: 52px;
    padding: 0.4rem 0.35rem;
    border-radius: 8px;
    background: var(--ps-bg-input);
    color: var(--ps-orange);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.timeline-body,
.work-row > span:first-child {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.timeline-body small,
.work-row small {
    color: var(--ps-text-muted);
    font-size: 0.78rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 180px;
    padding: 1.5rem;
    border: 1px dashed rgba(136,146,164,0.35);
    border-radius: 10px;
    background: rgba(255,255,255,0.018);
    color: var(--ps-text-muted);
    text-align: center;
}

.empty-state strong {
    color: var(--ps-text);
}

.empty-state span {
    max-width: 46ch;
    font-size: 0.86rem;
    line-height: 1.5;
}

.empty-state.compact {
    min-height: 135px;
}

.list-mobile-cards {
    display: none;
}

.data-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.data-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.95rem;
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    background: var(--ps-bg-card);
    color: var(--ps-text);
    text-decoration: none;
}

.data-card-top,
.data-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.data-card-title {
    color: var(--ps-text);
    font-weight: 700;
    text-decoration: none;
}

.data-card-meta {
    color: var(--ps-text-muted);
    font-size: 0.8rem;
}

.data-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Main form layout grid (2-col: info | phases) */
.form-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
/* Variant: 3 equal columns (rapports page) */
.form-main-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Settings page */
.settings-page-header {
    gap: 1rem;
}

.settings-header-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    min-width: 150px;
}

.settings-header-chip-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ps-text-muted);
}

.settings-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.settings-sidebar {
    position: sticky;
    top: 1.5rem;
    padding: 1rem;
}

.settings-sidebar-title {
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ps-text-muted);
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.settings-nav-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ps-text-muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.settings-nav-button:hover {
    background: rgba(255,255,255,0.03);
    color: var(--ps-text);
    border-color: var(--ps-border);
}

.settings-nav-button.active {
    background: var(--ps-orange-dim);
    color: var(--ps-orange);
    border-color: rgba(249,115,22,0.25);
    box-shadow: inset 0 0 0 1px rgba(249,115,22,0.12);
}

.settings-nav-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.settings-nav-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.settings-card {
    border-radius: 18px;
    padding: 1.35rem;
}

.settings-card-header {
    align-items: flex-start;
}

.settings-card-subtitle {
    margin: 0.35rem 0 0;
    color: var(--ps-text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
    max-width: 62ch;
}

.settings-alert {
    margin-bottom: 1rem;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.settings-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.settings-form-narrow {
    max-width: 440px;
}

.settings-form-regular {
    max-width: 520px;
}

.settings-field {
    min-width: 0;
}

.settings-field-full {
    grid-column: 1 / -1;
}

.settings-input {
    min-height: 46px;
}

.settings-input-mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.settings-help-text {
    margin-top: 0.35rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--ps-text-muted);
}

.settings-actions {
    margin-top: 0.35rem;
}

.settings-submit {
    justify-content: center;
    min-height: 46px;
    padding-inline: 1.1rem;
}

.settings-muted-title {
    color: var(--ps-text-muted);
}

.settings-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.88rem;
}

.settings-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--ps-text-muted);
}

.settings-info-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.settings-info-row strong {
    color: var(--ps-text);
    text-align: right;
}

/* â”€â”€ Divider â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ps-divider { border: none; border-top: 1px solid var(--ps-border); margin: 1rem 0; }

/* â”€â”€ Alerts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.alert-ps {
    padding: 0.75rem 1rem;
    border-radius: 7px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-ps-danger  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: var(--ps-danger); }
.alert-ps-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: var(--ps-success); }
.alert-ps-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: var(--ps-warning); }

/* â”€â”€ Login page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ps-bg);
    background-image: radial-gradient(ellipse at 30% 20%, rgba(249,115,22,0.06) 0%, transparent 60%);
}

.login-card {
    background: var(--ps-bg-card);
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(560px, 0.95fr) minmax(380px, 460px);
    align-items: stretch;
    width: min(100%, 1560px);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 3vw, 3.5rem);
    box-sizing: border-box;
    background:
        radial-gradient(circle at top left, rgba(249,115,22,0.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(59,130,246,0.12), transparent 28%),
        linear-gradient(135deg, #12151b 0%, #1a1d23 50%, #151922 100%);
}

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 5.5rem 4rem 4.5rem;
    overflow: hidden;
}

.login-hero::before,
.login-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
}

.login-hero::before {
    width: 220px;
    height: 220px;
    top: 10%;
    right: 8%;
    background: rgba(249,115,22,0.16);
}

.login-hero::after {
    width: 160px;
    height: 160px;
    bottom: 12%;
    left: 10%;
    background: rgba(255,255,255,0.04);
}

.login-hero-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(249,115,22,0.24);
    background: rgba(249,115,22,0.12);
    color: #ffd3b4;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.login-hero-logo {
    position: relative;
    z-index: 1;
    width: 92px;
    height: 92px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.25));
}

.login-hero-title {
    position: relative;
    z-index: 1;
    max-width: 11ch;
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 0.96;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-hero-text {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 0 1.5rem;
    font-size: 1.02rem;
    color: #c7cedb;
}

.login-hero-points {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.login-hero-point {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e8eaf0;
    font-size: 0.95rem;
}

.login-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #fb923c);
    box-shadow: 0 0 0 6px rgba(249,115,22,0.12);
    flex-shrink: 0;
}

.login-card-enhanced {
    align-self: center;
    justify-self: start;
    max-width: 460px;
    width: 100%;
    margin: 1.5rem 0 1.5rem -4rem;
    padding: 2rem;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(24, 28, 36, 0.82);
    box-shadow: 0 24px 80px rgba(0,0,0,0.34);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 16px;
    padding: 0.5rem;
    background: rgba(249,115,22,0.12);
    border: 1px solid rgba(249,115,22,0.18);
}

.login-brand-kicker {
    margin: 0 0 0.15rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ps-text-muted);
}

.login-brand-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-alert {
    margin-bottom: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.login-link-group {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.login-input {
    min-height: 52px;
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
}

.login-submit {
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 0.35rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
}

.login-link-button {
    border: none;
    padding: 0;
    background: transparent;
    color: #ffb37b;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.login-link-button:hover {
    color: #ffd3b4;
    text-decoration: underline;
}

.login-help-text {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--ps-text-muted);
}

.login-footer {
    margin: 1.4rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--ps-text-muted);
}

.login-hidden-autofill {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    inset: auto;
}

/* â”€â”€ Utilities â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.text-orange { color: var(--ps-orange); }
.text-muted-ps { color: var(--ps-text-muted); }
.gap-2 { gap: 0.5rem; }

/* â”€â”€ Blazor error â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.blazor-error-boundary {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    padding: 1rem;
    color: var(--ps-danger);
    border-radius: 7px;
}

#blazor-error-ui {
    background: var(--ps-danger);
    color: white;
    padding: 0.6rem 1rem;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    display: none;
    font-size: 0.875rem;
}

/* â”€â”€ Planning Calendar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cal-day-cell { transition: background 0.12s; }
.cal-day-cell:hover { background: var(--ps-orange-dim) !important; cursor: pointer; }
.cal-mission-bar { transition: opacity 0.15s, transform 0.12s; opacity: 0.93; }
.cal-mission-bar:hover { opacity: 1 !important; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.3); }

/* â”€â”€ Side Panel (detail / form drawer) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Desktop default: 460px wide slide-in from right */
.ps-side-panel {
    width: 460px;
}

/* â”€â”€ Portail tabs: no-wrap horizontal scroll â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.portail-tabs { scrollbar-width: none; }
.portail-tabs::-webkit-scrollbar { display: none; }
.portail-tabs button { flex-shrink: 0; }

.portal-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: -1rem 0 1.5rem;
}

.portal-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
}

.portal-summary-card span {
    color: var(--ps-text-muted);
    font-size: 0.76rem;
}

.portal-summary-card strong {
    color: var(--ps-text);
    font-size: 1.12rem;
}

.collab-settings-link-row,
.collab-settings-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.collab-settings-link-row input {
    flex: 1 1 280px;
    min-width: 0;
    font-size: 0.82rem;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.collab-log-cards {
    display: none;
}


/* â”€â”€ Mobile top bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--ps-bg-sidebar);
    border-bottom: 1px solid var(--ps-border);
    z-index: 200;
    align-items: center;
    padding: 0 1rem;
    gap: 0.875rem;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* â”€â”€ Hamburger button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s;
}
.hamburger-btn:hover { background: var(--ps-orange-dim); }

.hb-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ps-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, background 0.15s;
    transform-origin: center;
}

/* Animate to X when open */
.hamburger-btn.is-open .hb-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--ps-orange);
}
.hamburger-btn.is-open .hb-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger-btn.is-open .hb-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--ps-orange);
}

/* â”€â”€ Sidebar backdrop â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 149;
    transition: background 0.25s ease;
    pointer-events: none;
}

/* â”€â”€ Form helpers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* 2-col mini grid used inside form cards (collapses in media query below) */
.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
/* 2-col asymmetric: Montant (wide) + Devise (narrow) */
.form-two-col-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
}

/* Save-actions bar at the bottom of forms */
.form-save-bar {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.upload-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--ps-text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

/* â”€â”€ Intervention list  -  desktop table / mobile cards â”€â”€ */
.interv-desktop-table { display: block; }
.interv-mobile-cards  { display: none;  }

.interv-card {
    background: var(--ps-bg-card);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.interv-card:hover { border-color: var(--ps-orange); }

.interv-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.interv-card-site {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ps-text);
    text-decoration: none;
    line-height: 1.25;
}
.interv-card-site:hover { color: var(--ps-orange); }

.interv-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.interv-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.15rem;
}

.interv-card-date {
    font-size: 0.8rem;
    color: var(--ps-text-muted);
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {

    /* â”€â”€ Content padding â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .content { padding: 1rem 0.875rem; }

    /* â”€â”€ Page header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.875rem;
        margin-bottom: 1.25rem;
    }
    /* Single action button (most list pages) */
    .page-header > a.btn-ps,
    .page-header > button.btn-ps {
        width: 100%;
        justify-content: center;
    }
    /* Multiple action buttons (dashboard) */
    .page-header-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    .page-header-actions > .btn-ps,
    .page-header-actions > a.btn-ps {
        width: 100%;
        justify-content: center;
    }

    /* â”€â”€ Filter bars â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .ps-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 0.875rem;
    }
    /* Override any inline max-width on inputs/selects inside filters */
    .ps-filters > .form-control,
    .ps-filters > .form-select { max-width: none !important; width: 100%; }
    .ps-filters > label { width: 100%; margin: 0; }

    /* â”€â”€ Tables: horizontal scroll â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .ps-card:has(.ps-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* scroll hint: faint right-edge gradient */
        background-image: linear-gradient(to right, var(--ps-bg-card) 80%, transparent),
                          linear-gradient(to right, transparent, rgba(249,115,22,0.08) 100%);
        background-attachment: local, scroll;
        background-size: 20px 100%, 12px 100%;
        background-repeat: no-repeat;
        background-position: right, right;
    }
    .ps-table th,
    .ps-table td { white-space: nowrap; }

    /* â”€â”€ Two-col / three-col grids  ->  single col â”€â”€â”€â”€â”€ */
    .ps-two-col-grid,
    .dashboard-work-grid,
    .form-main-grid,
    .form-main-grid-3,
    .form-two-col,
    .form-two-col-2-1 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .dashboard-hero {
        flex-direction: column;
        padding: 1rem;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .quick-action-card {
        min-height: auto;
    }

    .list-desktop-table {
        display: none;
    }

    .list-mobile-cards {
        display: block;
    }

    .data-card-foot {
        align-items: stretch;
        flex-direction: column;
    }

    /* â”€â”€ Form save bar  ->  full-width stacked â”€â”€â”€â”€â”€â”€â”€â”€ */
    .form-save-bar {
        position: sticky;
        bottom: 0;
        z-index: 20;
        margin: 0 -1rem -1rem;
        padding: 0.75rem 1rem;
        background: color-mix(in srgb, var(--ps-bg-card) 92%, transparent);
        border-top: 1px solid var(--ps-border);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .form-save-bar > .btn-ps,
    .form-save-bar > a.btn-ps {
        width: 100%;
        justify-content: center;
    }
    .form-save-bar > span { text-align: center; }

    /* â”€â”€ Intervention list: hide table, show cards â”€â”€ */
    .interv-desktop-table { display: none; }
    .interv-mobile-cards  { display: flex; flex-direction: column; gap: 0.65rem; }

    /* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .ps-card { padding: 1rem; border-radius: 10px; }

    /* â”€â”€ Side panels: full-width on phone â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .ps-side-panel {
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid var(--ps-border) !important;
        top: auto !important;       /* anchor to bottom */
        max-height: 90dvh;
        border-radius: 16px 16px 0 0;
        overflow-y: auto;
    }

    /* â”€â”€ Portail portal header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .portail-header-card {
        gap: 0.875rem;
        padding: 1rem;
    }

    .portal-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: -0.5rem;
    }

    .portail-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem !important;
        border-bottom: none !important;
        overflow: visible !important;
        white-space: normal !important;
    }

    .portail-tabs button {
        width: 100%;
        border: 1px solid var(--ps-border) !important;
        border-radius: 9px;
        margin-bottom: 0 !important;
        background: var(--ps-bg-card) !important;
        text-align: center;
        justify-content: center;
    }

    .collab-settings-link-row,
    .collab-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .collab-settings-link-row input,
    .collab-settings-link-row .btn-ps,
    .collab-settings-actions .btn-ps {
        width: 100%;
        justify-content: center;
    }

    .collab-log-table {
        display: none;
    }

    .collab-log-cards {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    /* â”€â”€ Planning month nav label â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    .plan-month-label { min-width: 140px !important; font-size: 1rem !important; }


    /* Show the top bar */
    .mobile-topbar { display: flex; }

    /* Push content below top bar */
    main {
        margin-left: 0;
        padding-top: 56px;
    }

    /* Sidebar: off-screen by default, slides in */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 150;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
    }

    /* Backdrop: active when sidebar open */
    .sidebar-backdrop {
        display: block;
        pointer-events: none;
    }
    .sidebar-backdrop.visible {
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        pointer-events: all;
    }

    .settings-header-chip {
        width: 100%;
        align-items: flex-start;
        min-width: 0;
    }

    .settings-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .settings-sidebar {
        position: static;
        padding: 0.85rem;
        overflow: hidden;
    }

    .settings-sidebar-title {
        margin-bottom: 0.7rem;
    }

    .settings-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .settings-nav-button {
        min-width: 0;
        padding: 0.75rem 0.8rem;
        align-items: flex-start;
    }

    .settings-card {
        padding: 1rem;
        border-radius: 16px;
    }

    .settings-card-subtitle {
        font-size: 0.8rem;
    }

    .settings-form-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .settings-form-narrow,
    .settings-form-regular {
        max-width: none;
    }

    .settings-submit {
        width: 100%;
    }

    .settings-info-row {
        flex-direction: column;
        gap: 0.3rem;
    }

    .settings-info-row strong {
        text-align: left;
    }

    .login-shell {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .login-hero {
        padding: 1.75rem 0.35rem 0.75rem;
    }

    .login-hero::before {
        width: 120px;
        height: 120px;
        top: 4%;
        right: -5%;
    }

    .login-hero::after {
        width: 110px;
        height: 110px;
        bottom: 8%;
        left: -4%;
    }

    .login-hero-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .login-hero-title {
        max-width: none;
        font-size: 2rem;
        line-height: 1.02;
    }

    .login-hero-text {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .login-hero-points {
        gap: 0.6rem;
    }

    .login-hero-point {
        font-size: 0.85rem;
    }

    .login-card-enhanced {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 1.25rem;
        border-radius: 24px;
    }

    .login-brand {
        margin-bottom: 1.1rem;
    }

    .login-brand-title {
        font-size: 1.25rem;
    }

    .login-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .login-link-group {
        justify-content: flex-start;
        gap: 0.55rem 1rem;
    }

    .login-help-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .settings-nav {
        grid-template-columns: 1fr;
    }
}

/* â”€â”€ Scrollbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ps-bg); }
::-webkit-scrollbar-thumb { background: var(--ps-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ps-text-muted); }


/* ===== Sites map (Leaflet) ===== */
.preffa-pin { background: transparent !important; border: none !important; }
.preffa-pin-inner {
    position: relative;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    border: 3px solid var(--ps-orange);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    font-weight: 800; font-size: 0.95rem; color: var(--ps-orange);
}
.preffa-pin-inner img { width: 100%; height: 100%; object-fit: contain; padding: 3px; background: white; }
.preffa-pin-tail {
    position: absolute; left: 50%; bottom: 0;
    transform: translate(-50%, 60%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid var(--ps-orange);
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25));
}
.preffa-pin-me .preffa-pin-inner {
    border-color: #22c55e;
    background: #22c55e;
    color: white; font-size: 1.2rem;
}
/* When Mohamed's photo is rendered inside the green pin, fill the circle (no padding, cover). */
.preffa-pin-me .preffa-pin-inner img { padding: 0; object-fit: cover; background: transparent; }
.preffa-pin-me .preffa-pin-tail { border-top-color: #22c55e; }
.preffa-pin-pulse {
    position: absolute;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(34,197,94,0.45);
    animation: preffaPulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes preffaPulse {
    0%   { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(2.4); opacity: 0; }
}

.leaflet-popup-content-wrapper {
    background: var(--ps-bg-card) !important;
    color: var(--ps-text) !important;
    border-radius: 10px !important;
    border: 1px solid var(--ps-border);
}
.leaflet-popup-tip { background: var(--ps-bg-card) !important; border: 1px solid var(--ps-border); }
.leaflet-popup-close-button { color: var(--ps-text-muted) !important; }
.preffa-pop-title { font-weight: 700; color: var(--ps-text); margin-bottom: 4px; font-size: 0.95rem; }
.preffa-pop-row { font-size: 0.82rem; color: var(--ps-text); padding: 2px 0; }
.preffa-pop-row a { color: var(--ps-info); text-decoration: none; }
.preffa-pop-btn {
    display: inline-block; padding: 4px 10px;
    background: var(--ps-orange); color: white !important;
    border-radius: 6px; font-weight: 600; text-decoration: none !important;
    font-size: 0.82rem;
}
