/*  ═══════════════════════════════════════════════════════════
    GLSW Portal — Global + Login styles (shadcn-inspired)
    ═══════════════════════════════════════════════════════════ */

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

html { height: 100%; }

.glsw-body {
    font-family: var(--font-sans);
    color: var(--foreground);
    background: hsl(220 20% 97%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Header ──────────────────────────────────────────────────── */
.glsw-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: hsl(0 0% 100% / 0.82);
    backdrop-filter: blur(12px) saturate(1.8);
    -webkit-backdrop-filter: blur(12px) saturate(1.8);
    border-bottom: 1px solid hsl(214 32% 91% / 0.6);
    box-shadow: 0 1px 3px hsl(0 0% 0% / 0.04), 0 4px 12px hsl(0 0% 0% / 0.02);
}

.glsw-header__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.glsw-header__logo img {
    display: block;
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.glsw-header__logo:hover img {
    transform: scale(1.04);
}

/* ── Main ────────────────────────────────────────────────────── */
.glsw-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Footer ──────────────────────────────────────────────────── */
.glsw-footer {
    background: hsl(0 0% 100% / 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid hsl(214 32% 91% / 0.5);
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

.glsw-heading-2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.glsw-text-muted {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Badge
   ═══════════════════════════════════════════════════════════════ */

.glsw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    width: fit-content;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.glsw-badge--emerald {
    background: var(--emerald-light);
    color: var(--emerald);
}

.glsw-badge--blue {
    background: var(--blue-light);
    color: var(--blue);
}

.glsw-badge--warning {
    background: hsl(45 93% 94%);
    color: hsl(25 95% 40%);
}

.glsw-badge--destructive {
    background: hsl(0 84% 95%);
    color: hsl(0 72% 45%);
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Form elements
   ═══════════════════════════════════════════════════════════════ */

.glsw-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.glsw-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.glsw-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--foreground);
}

.glsw-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.glsw-input-icon {
    position: absolute;
    left: 0.75rem;
    width: 16px;
    height: 16px;
    color: var(--muted-foreground);
    pointer-events: none;
}

.glsw-input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem 0 2.35rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--background);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--foreground);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.glsw-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.6;
}

.glsw-input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px hsl(142 72% 29% / 0.12);
}

/* Inputs without icon wrapper get normal padding */
.glsw-field > .glsw-input,
.glsw-feuille-grid .glsw-field > .glsw-input {
    padding-left: 0.75rem;
}

.glsw-input-toggle-pw {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--muted-foreground);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.glsw-input-toggle-pw:hover {
    color: var(--foreground);
}

.glsw-input-toggle-pw svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Buttons
   ═══════════════════════════════════════════════════════════════ */

.glsw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), opacity var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    line-height: 1;
}

.glsw-btn--primary {
    background: linear-gradient(135deg, hsl(142 72% 32%), hsl(142 72% 26%));
    color: var(--primary-foreground);
    box-shadow: 0 1px 3px hsl(142 72% 29% / 0.25), 0 1px 2px hsl(0 0% 0% / 0.08);
}

.glsw-btn--primary:hover {
    background: linear-gradient(135deg, hsl(142 72% 35%), hsl(142 72% 29%));
    box-shadow: 0 4px 14px hsl(142 72% 29% / 0.3);
    transform: translateY(-1px);
}

.glsw-btn--primary:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.glsw-btn--full {
    width: 100%;
    margin-top: 0.5rem;
}

.glsw-btn[disabled] {
    opacity: 0.55;
    pointer-events: none;
}

/* spinner inside button — hidden by default via [hidden] attribute */
.glsw-btn__spinner { display: none; }
.glsw-btn__spinner:not([hidden]) { display: inline-flex; }

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Alert
   ═══════════════════════════════════════════════════════════════ */

.glsw-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.glsw-alert--error {
    background: hsl(0 84% 60% / 0.08);
    color: var(--destructive);
    border: 1px solid hsl(0 84% 60% / 0.2);
}

.glsw-alert[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Card
   ═══════════════════════════════════════════════════════════════ */

.glsw-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Divider
   ═══════════════════════════════════════════════════════════════ */

.glsw-divider {
    height: 1px;
    background: var(--border);
    margin: 1.25rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Links
   ═══════════════════════════════════════════════════════════════ */

.glsw-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.glsw-link:hover { color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   COMPANY FOOTER inside login panels
   ═══════════════════════════════════════════════════════════════ */

.glsw-login__company {
    margin-top: auto;
    padding-top: 1rem;
}

.glsw-company-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.glsw-company-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Textarea
   ═══════════════════════════════════════════════════════════════ */

.glsw-textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--background);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--foreground);
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.glsw-textarea:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px hsl(142 72% 29% / 0.12);
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Checkbox
   ═══════════════════════════════════════════════════════════════ */

.glsw-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
    cursor: pointer;
    user-select: none;
}

.glsw-checkbox input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: hsl(142 72% 29%);
    cursor: pointer;
}

.glsw-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.glsw-check-group--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Button variants
   ═══════════════════════════════════════════════════════════════ */

.glsw-btn--outline {
    background: var(--background);
    color: var(--foreground);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.glsw-btn--outline:hover {
    background: var(--secondary);
    border-color: hsl(214 32% 85%);
    box-shadow: 0 2px 8px hsl(0 0% 0% / 0.06);
    transform: translateY(-1px);
}

.glsw-btn--sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    gap: 0.35rem;
}

.glsw-input--sm {
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Alert success
   ═══════════════════════════════════════════════════════════════ */

.glsw-alert--warning {
    background: hsl(45 93% 94%);
    color: hsl(25 95% 40%);
    border: 1px solid hsl(45 80% 70%);
}

.glsw-alert--success {
    background: hsl(142 76% 95%);
    color: hsl(142 72% 29%);
    border: 1px solid hsl(142 72% 29% / 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER (shared across pages)
   ═══════════════════════════════════════════════════════════════ */

.glsw-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, hsl(142 40% 97%) 0%, hsl(0 0% 100%) 50%, hsl(214 50% 97%) 100%);
    border-bottom: 1px solid var(--border);
    animation: glsw-fade-down 0.4s ease both;
}

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

.glsw-page-header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.glsw-page-header__left .glsw-badge {
    margin-bottom: 0;
}

.glsw-page-header__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.glsw-heading-1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.02em;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   CACHE INDICATOR — stale-while-revalidate banner
   ═══════════════════════════════════════════════════════════════ */

.glsw-cache-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: hsl(217 91% 97%);
    color: hsl(217 91% 40%);
    border: 1px solid hsl(217 91% 90%);
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 0;
    transition: opacity 0.3s ease;
    animation: glsw-fade-down 0.3s ease both;
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Dialog (reusable modal)
   ═══════════════════════════════════════════════════════════════ */

.glsw-dialog {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.glsw-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: hsl(220 20% 10% / 0.45);
    backdrop-filter: blur(8px) saturate(1.5);
    -webkit-backdrop-filter: blur(8px) saturate(1.5);
    animation: glsw-backdrop-in 0.25s ease both;
}

.glsw-dialog__sheet {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 32px 64px -16px hsl(220 20% 10% / 0.3),
                0 0 0 1px hsl(0 0% 100% / 0.08);
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    animation: glsw-panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.glsw-dialog__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: currentColor;
    margin-bottom: 0.25rem;
}

.glsw-dialog__icon::before {
    content: '';
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.12;
}

.glsw-dialog__icon i,
.glsw-dialog__icon svg {
    width: 28px !important;
    height: 28px !important;
    color: hsl(0 0% 100%);
    position: relative;
    z-index: 1;
}

.glsw-dialog__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0.25rem 0 0;
    letter-spacing: -0.01em;
}

.glsw-dialog__message {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin: 0;
}

.glsw-dialog__buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.glsw-dialog__buttons .glsw-btn {
    width: 100%;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   DEV BAR
   ═══════════════════════════════════════════════════════════════ */

.glsw-dev-bar {
    background: linear-gradient(135deg, hsl(45 93% 96%), hsl(25 90% 96%));
    border-bottom: 1px solid hsl(45 80% 80% / 0.6);
    padding: 0.6rem 1.5rem;
    animation: glsw-fade-down 0.3s ease both;
}

.glsw-dev-bar__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.glsw-dev-bar__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(25 95% 53%);
    background: hsl(25 95% 53% / 0.12);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.glsw-dev-bar__field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--foreground);
}

.glsw-dev-bar__field label {
    font-weight: 500;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   PLANNING PAGE
   ═══════════════════════════════════════════════════════════════ */

.glsw-page-planning {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.glsw-planning-list {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.glsw-planning-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 1.5rem;
    color: var(--muted-foreground);
    text-align: center;
    animation: glsw-fade-down 0.4s ease both;
}

.glsw-planning-empty p {
    font-size: 0.95rem;
    max-width: 320px;
    line-height: 1.5;
}

.glsw-planning-empty[hidden] {
    display: none;
}

/* ── Card entrance animation ─────────────────────── */
@keyframes glsw-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Planning card — horizontal layout with sidebar */
.glsw-planning-card {
    display: flex;
    background: var(--card);
    border: 1px solid hsl(214 32% 91% / 0.8);
    border-left: 3px solid hsl(217 91% 60%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px hsl(0 0% 0% / 0.04), 0 2px 8px hsl(0 0% 0% / 0.03);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: glsw-card-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--card-index, 0) * 70ms);
}

.glsw-planning-card:hover {
    box-shadow: 0 8px 24px hsl(217 91% 60% / 0.1), 0 2px 8px hsl(0 0% 0% / 0.06);
    border-color: hsl(217 91% 60% / 0.35);
    transform: translateY(-3px);
}

/* ── Right sidebar: action buttons (2-col grid) ──── */
.glsw-planning-card__sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 0.4rem;
    background: linear-gradient(180deg, hsl(214 40% 97%), hsl(214 30% 95%));
    border-left: 1px solid hsl(214 32% 91% / 0.6);
    flex-shrink: 0;
    width: 120px;
    align-content: start;
}

.glsw-sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.4rem 0.2rem;
    border: none;
    border-radius: 8px;
    background: hsl(0 0% 100% / 0.5);
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    line-height: 1.1;
}

.glsw-sidebar-btn i,
.glsw-sidebar-btn svg {
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.glsw-sidebar-btn:hover {
    background: hsl(0 0% 100%);
    color: hsl(217 91% 50%);
    box-shadow: 0 2px 8px hsl(217 91% 60% / 0.12);
    transform: translateY(-1px);
}

.glsw-sidebar-btn:hover i,
.glsw-sidebar-btn:hover svg {
    transform: scale(1.1);
}

.glsw-sidebar-btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: none;
}

.glsw-sidebar-btn--warn {
    color: hsl(0 72% 50%);
    background: hsl(0 80% 97%);
}

.glsw-sidebar-btn--warn:hover {
    background: hsl(0 80% 95%);
    color: hsl(0 72% 40%);
    box-shadow: 0 2px 8px hsl(0 72% 50% / 0.12);
}

.glsw-sidebar-sep {
    grid-column: 1 / -1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0.2rem 0.5rem;
}

/* ── Card content (right side) ───────────────────── */
.glsw-planning-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.glsw-planning-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, hsl(214 40% 97%), hsl(210 40% 96%));
    border-bottom: 1px solid hsl(214 32% 91% / 0.6);
}

.glsw-planning-card__header .glsw-badge {
    margin-bottom: 0;
}

.glsw-planning-card__time {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
    padding: 0.2rem 0.6rem;
    background: hsl(0 0% 100%);
    border-radius: 6px;
    border: 1px solid hsl(214 32% 91% / 0.5);
}

.glsw-planning-card__body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.glsw-planning-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
}

.glsw-planning-card__remark {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0.5rem 0 0;
    padding: 0.4rem 0.6rem;
    background: hsl(45 93% 97%);
    border-left: 2px solid hsl(45 80% 60%);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    line-height: 1.4;
}

.glsw-planning-card__bulle {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0.5rem 0 0;
    padding: 0.4rem 0.6rem;
    background: hsl(214 50% 97%);
    border-left: 2px solid hsl(217 91% 70%);
    border-radius: 0 6px 6px 0;
    line-height: 1.4;
}

/* Card metadata grid */
.glsw-planning-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.glsw-planning-card__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    background: hsl(214 40% 96%);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.glsw-planning-card__meta > span:hover {
    background: hsl(214 40% 93%);
}

.glsw-planning-card__meta strong {
    font-weight: 600;
    color: var(--foreground);
    margin-right: 0.1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Libellé intervention */
.glsw-planning-card__libelle {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0.5rem 0 0;
    line-height: 1.45;
    padding: 0.35rem 0.6rem;
    background: hsl(0 0% 0% / 0.015);
    border-radius: 6px;
}

/* Address in meta grid spans full width */
.glsw-planning-card__meta-address {
    flex-basis: 100%;
}

.glsw-planning-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid hsl(214 32% 91% / 0.5);
    gap: 1rem;
    background: hsl(0 0% 0% / 0.01);
}

.glsw-planning-card__footer .glsw-text-muted {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.glsw-planning-card__badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Inline heure d'arrivée ──────────────────────── */
.glsw-heure-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(135deg, hsl(217 91% 60% / 0.04), hsl(217 91% 60% / 0.08));
    border: 1px solid hsl(217 91% 60% / 0.15);
    border-radius: 8px;
    animation: glsw-card-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.glsw-heure-inline__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    white-space: nowrap;
}

/* ── Action panel overlay ────────────────────────── */
@keyframes glsw-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes glsw-panel-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes glsw-panel-out {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.97) translateY(8px); }
}

@keyframes glsw-backdrop-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.glsw-action-panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.glsw-action-panel[hidden] { display: none; }

.glsw-action-panel__backdrop {
    position: absolute;
    inset: 0;
    background: hsl(220 20% 10% / 0.4);
    backdrop-filter: blur(8px) saturate(1.5);
    -webkit-backdrop-filter: blur(8px) saturate(1.5);
    animation: glsw-backdrop-in 0.25s ease both;
}

.glsw-action-panel__sheet {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 32px 64px -16px hsl(220 20% 10% / 0.3),
                0 0 0 1px hsl(0 0% 100% / 0.08),
                0 0 80px -20px hsl(217 91% 60% / 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: glsw-panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.glsw-action-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid hsl(214 32% 91% / 0.5);
    flex-shrink: 0;
    background: linear-gradient(135deg, hsl(214 40% 97%), hsl(210 40% 96%));
}

.glsw-action-panel__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    letter-spacing: -0.01em;
}

.glsw-action-panel__header .glsw-btn--outline {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    flex-shrink: 0;
}

.glsw-action-panel__header .glsw-btn--outline:hover {
    background: hsl(0 84% 60% / 0.08);
    border-color: hsl(0 84% 60% / 0.2);
    color: hsl(0 84% 60%);
}

.glsw-action-panel__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    font-size: 0.875rem;
    color: var(--foreground);
}

/* Panel data table */
.glsw-panel-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid hsl(214 32% 91% / 0.5);
}

.glsw-panel-table th,
.glsw-panel-table td {
    text-align: left;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid hsl(214 32% 91% / 0.4);
    font-size: 0.8125rem;
}

.glsw-panel-table th {
    font-weight: 600;
    color: var(--muted-foreground);
    white-space: nowrap;
    width: 150px;
    background: hsl(214 40% 97%);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.glsw-panel-table tbody tr {
    transition: background 0.15s ease;
}

.glsw-panel-table tbody tr:hover {
    background: hsl(217 91% 60% / 0.03);
}

.glsw-panel-table tbody tr:last-child td,
.glsw-panel-table tbody tr:last-child th {
    border-bottom: none;
}

.glsw-panel-table thead th {
    background: linear-gradient(135deg, hsl(214 40% 96%), hsl(210 40% 95%));
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Panel loading / empty state */
.glsw-panel-loading,
.glsw-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3.5rem 2rem;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    animation: glsw-fade-down 0.3s ease both;
}

/* ── Entretien: primary cards grid ──────────────── */
.glsw-ent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.glsw-ent-card {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: hsl(214 40% 97%);
    border: 1px solid hsl(214 32% 91% / 0.5);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.glsw-ent-card:hover {
    background: hsl(214 40% 95%);
    border-color: hsl(214 32% 85%);
}

.glsw-ent-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: hsl(0 0% 100%);
    box-shadow: 0 1px 3px hsl(0 0% 0% / 0.06);
    flex-shrink: 0;
    color: hsl(217 91% 50%);
}

.glsw-ent-card__icon svg,
.glsw-ent-card__icon i {
    width: 16px !important;
    height: 16px !important;
}

.glsw-ent-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.glsw-ent-card__label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted-foreground);
}

.glsw-ent-card__value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    word-break: break-word;
}

/* ── Entretien: collapsible detail ribbon ────────── */
.glsw-ent-details {
    margin-top: 0.85rem;
    border: 1px solid hsl(214 32% 91% / 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.glsw-ent-details__toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.85rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-foreground);
    cursor: pointer;
    background: hsl(214 40% 97%);
    transition: background 0.15s ease, color 0.15s ease;
    list-style: none;
}

.glsw-ent-details__toggle::-webkit-details-marker { display: none; }

.glsw-ent-details__toggle:hover {
    background: hsl(214 40% 95%);
    color: var(--foreground);
}

.glsw-ent-details__chevron {
    width: 14px !important;
    height: 14px !important;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.glsw-ent-details[open] .glsw-ent-details__chevron {
    transform: rotate(90deg);
}

.glsw-ent-details .glsw-panel-table {
    border: none;
    border-radius: 0;
    border-top: 1px solid hsl(214 32% 91% / 0.4);
}

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

/* ── Planning tabs ─────────────────────────────── */
.glsw-planning-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0 1.5rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.glsw-planning-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s ease;
}

.glsw-planning-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background 0.2s ease;
}

.glsw-planning-tab:hover {
    color: var(--foreground);
}

.glsw-planning-tab--active {
    color: var(--primary);
    font-weight: 600;
}

.glsw-planning-tab--active::after {
    background: var(--primary);
}

.glsw-planning-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    background: hsl(214 40% 94%);
    color: var(--muted-foreground);
}

.glsw-planning-tab--active .glsw-planning-tab__count {
    background: hsl(142 76% 95%);
    color: var(--primary);
}

/* ── Card "done" state ───────────────────────────── */
.glsw-planning-card--done {
    border-left-color: hsl(142 72% 29%);
    border-color: hsl(142 72% 29% / 0.2);
    border-left-color: hsl(142 72% 29%);
}

.glsw-planning-card--done:hover {
    box-shadow: 0 8px 24px hsl(142 72% 29% / 0.1), 0 2px 8px hsl(0 0% 0% / 0.06);
    border-color: hsl(142 72% 29% / 0.3);
    border-left-color: hsl(142 72% 29%);
}

.glsw-planning-card--done .glsw-planning-card__sidebar {
    background: hsl(142 72% 29% / 0.04);
    border-left-color: hsl(142 72% 29% / 0.1);
}

.glsw-planning-card--done .glsw-planning-card__header {
    background: linear-gradient(135deg, hsl(142 40% 97%), hsl(142 30% 96%));
}

/* ── Mobile responsive: sidebar becomes bottom bar ── */
@media (max-width: 600px) {
    .glsw-planning-card {
        flex-direction: column;
        border-left-width: 3px;
    }

    .glsw-planning-card__sidebar {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        border-left: none;
        border-top: 1px solid hsl(214 32% 91% / 0.5);
        overflow-x: auto;
        padding: 0.4rem;
        gap: 3px;
    }

    .glsw-sidebar-btn {
        flex-direction: row;
        gap: 0.25rem;
        padding: 0.35rem 0.55rem;
        font-size: 0.65rem;
        border-radius: 6px;
    }

    .glsw-sidebar-sep {
        width: 1px;
        height: 20px;
        margin: 0 0.15rem;
        background: var(--border);
    }
}

/* ═══════════════════════════════════════════════════════════════
   FEUILLE DE ROUTE PAGE
   ═══════════════════════════════════════════════════════════════ */

.glsw-page-feuille {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.glsw-feuille-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 220px;
}

.glsw-feuille-main {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

/* Section blocks */
.glsw-feuille-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
}

.glsw-section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.glsw-subsection-heading {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 1rem 0 0.5rem;
}

.glsw-subsection-heading:first-child {
    margin-top: 0;
}

/* Grid layouts */
.glsw-feuille-grid {
    display: grid;
    gap: 0.75rem;
}

.glsw-feuille-grid--1 { grid-template-columns: 1fr; }
.glsw-feuille-grid--2 { grid-template-columns: 1fr 1fr; }
.glsw-feuille-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Actions bar */
.glsw-feuille-actions {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.glsw-feuille-actions__buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* ── Sidebar ──────────────────────────────────────────────────── */

.glsw-feuille-sidebar {
    position: sticky;
    top: 60px;
    align-self: start;
    border-left: 1px solid var(--border);
    background: var(--card);
    padding: 1rem 0;
    height: calc(100vh - 60px);
}

.glsw-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.glsw-sidebar-nav__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.glsw-sidebar-nav__item:hover {
    color: var(--foreground);
    background: var(--secondary);
}

.glsw-sidebar-nav__item.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: hsl(142 76% 95%);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN — Full-screen centered layout
   ═══════════════════════════════════════════════════════════════ */

/* Body modifier: hide header, center everything */
.glsw-body--login .glsw-header {
    display: none;
}

.glsw-body--login .glsw-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.glsw-body--login .glsw-footer {
    background: transparent;
    border-top: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Login grid */
.glsw-login {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
}

/* Single panel (tech-only) — centered */
.glsw-login--single {
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    flex: unset;
}

.glsw-login--single .glsw-login__panel {
    max-width: 440px;
    width: 100%;
    border-right: none;
    border-radius: var(--radius-xl);
    margin: 0;
}

/* Logo inside the card */
.glsw-login__logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.glsw-login__logo img {
    display: inline-block;
    height: 52px;
    width: auto;
    object-fit: contain;
}

.glsw-login__panel {
    display: flex;
    align-items: stretch;
    padding: 2.5rem 2.5rem 2rem;
}

.glsw-login__panel-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Card style */
.glsw-login__panel--tech {
    background: var(--background);
    border: 1px solid var(--border);
    box-shadow:
        0 1px 3px hsl(0 0% 0% / 0.06),
        0 8px 24px hsl(0 0% 0% / 0.04);
}

.glsw-login__panel--client {
    background: var(--background);
}

/* Secondary links */
.glsw-login__links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY — spinner animation
   ═══════════════════════════════════════════════════════════════ */

@keyframes glsw-spin {
    to { transform: rotate(360deg); }
}
.glsw-spin { animation: glsw-spin 0.75s linear infinite; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

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

    .glsw-login__panel {
        padding: 2rem 1.5rem;
    }

    .glsw-login__panel--tech {
        border-right: none;
    }

    .glsw-body--login .glsw-main {
        padding: 1rem;
    }
}

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

    .glsw-feuille-sidebar {
        display: none;
    }

    .glsw-feuille-grid--2,
    .glsw-feuille-grid--3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .glsw-header__inner {
        padding: 0.6rem 1rem;
    }

    .glsw-header__logo img {
        height: 32px;
    }

    .glsw-body--login .glsw-main {
        padding: 0.75rem;
    }

    .glsw-login--single .glsw-login__panel {
        border-radius: var(--radius-lg);
    }

    .glsw-login__panel {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .glsw-login__logo img {
        height: 40px;
    }

    .glsw-heading-2 {
        font-size: 1.25rem;
    }

    .glsw-page-header {
        padding: 1rem;
    }

    .glsw-planning-list {
        padding: 1rem;
    }

    .glsw-feuille-main {
        padding: 1rem;
    }

    .glsw-feuille-section {
        padding: 1rem;
    }
}
