/* ==========================================================================
   TIM Paysage · Modern SaaS design system
   Edit this file directly. No build step needed.
   ========================================================================== */

:root {
    --brand-50:  #F4F8F2;
    --brand-100: #E6EFE0;
    --brand-200: #CDE0BF;
    --brand-300: #A8C58F;
    --brand-400: #7FA36B;
    --brand-500: #5E7D4D;
    --brand-600: #4E6A40;
    --brand-700: #3F5A35;
    --brand-800: #2F4228;
    --brand-900: #1F2C1B;

    --surface:       #FFFFFF;
    --surface-muted: #F7F8F6;
    --ink-900: #0F1912;
    --ink-700: #293529;
    --ink-500: #5A6B5A;
    --ink-400: #8A9A8A;
    --border:  #E7ECE4;

    /* Stitch "Curated Landscape" tokens — surface scale + darker primary for Block 2+ */
    --stitch-primary:            #334f2b;
    --stitch-primary-container:  #4a6741;
    --stitch-tertiary:           #424a3e;   /* TPVR entity ribbon */
    --stitch-primary-fixed:      #caecbc;
    --stitch-secondary-container:#d9e3d3;
    --stitch-on-primary-fixed-variant: #324e2a;
    --stitch-on-secondary-container:   #5c6559;

    --surface-bright:            #f8faf7;
    --surface-container-lowest:  #ffffff;
    --surface-container-low:     #f2f4f1;
    --surface-container:         #eceeeb;
    --surface-container-high:    #e7e9e6;
    --surface-container-highest: #e1e3e0;
    --outline-variant:           #c3c8bd;

    --shadow-xs: 0 1px 2px rgba(31, 44, 27, .04);
    --shadow-sm: 0 2px 6px -1px rgba(31, 44, 27, .06), 0 1px 3px -1px rgba(31, 44, 27, .04);
    --shadow-md: 0 8px 20px -8px rgba(63, 90, 53, .18), 0 2px 6px -2px rgba(31, 44, 27, .05);
    --shadow-lg: 0 20px 40px -16px rgba(63, 90, 53, .22), 0 4px 10px -4px rgba(31, 44, 27, .06);
    --shadow-glow: 0 0 0 4px rgba(94, 125, 77, .12);

    --radius-sm: .5rem;
    --radius-md: .75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
html, body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    color: var(--ink-900);
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(127, 163, 107, .10), transparent 60%),
        radial-gradient(900px 500px at 110% 10%, rgba(94, 125, 77, .08), transparent 55%),
        var(--brand-50);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background: rgba(94, 125, 77, .25); }

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 500;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .18s var(--ease);
    white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-glow); }

.btn-primary {
    background: linear-gradient(180deg, #6B8A5A 0%, #5E7D4D 100%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 16px -6px rgba(63, 90, 53, .45);
    border: 0;
}
.btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 10px 20px -8px rgba(63, 90, 53, .55); }
.btn-primary:active { transform: translateY(0); filter: brightness(.96); }

.btn-secondary {
    background: #fff; color: var(--ink-700);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--ink-900); }

.btn-ghost {
    background: transparent; color: var(--ink-700); border: 0;
}
.btn-ghost:hover { background: rgba(94, 125, 77, .08); color: var(--brand-700); }

.btn-danger {
    background: linear-gradient(180deg, #E85C5C 0%, #DC2626 100%);
    color: #fff; border: 0;
    box-shadow: 0 6px 16px -6px rgba(220, 38, 38, .45);
}
.btn-danger:hover { transform: translateY(-1px); }

/* Compat aliases for legacy markup */
.btn-primary, .btn-secondary, .btn-danger { display: inline-flex; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-glass {
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(231, 236, 228, .8);
}

/* ---------- Inputs ---------- */
.input {
    display: block; width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .55rem .8rem;
    font-size: .875rem;
    color: var(--ink-900);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
    box-shadow: var(--shadow-xs);
}
.input:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--shadow-glow); }

.label {
    display: block; font-size: .8125rem; font-weight: 500;
    color: var(--ink-700); margin-bottom: .375rem;
    letter-spacing: .01em;
}

/* ---------- Tom Select theming ---------- */
.ts-wrapper {
    --ts-pr-item: .4rem;
    padding: 0 !important;
}
.ts-wrapper .ts-control {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .5rem .75rem;
    font-size: .875rem;
    color: var(--ink-900);
    box-shadow: var(--shadow-xs);
    min-height: 40px;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.ts-wrapper.focus .ts-control,
.ts-wrapper .ts-control:focus {
    border-color: var(--brand-400);
    box-shadow: var(--shadow-glow);
    outline: none;
}
.ts-wrapper.disabled .ts-control { opacity: .55; cursor: not-allowed; background: var(--surface-muted); }

.ts-wrapper .ts-control > input {
    font-size: inherit;
    color: var(--ink-900);
    min-width: 4rem;
    margin: 0 !important;
    padding: 0 !important;
}
.ts-wrapper .ts-control > input::placeholder { color: var(--ink-400); }

/* Multi-select chips */
.ts-wrapper.multi .ts-control > .item {
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid var(--brand-200);
    border-radius: 6px;
    padding: 2px 6px 2px 10px;
    margin: 0;
    font-size: .8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.35;
    box-shadow: none;
    text-shadow: none;
}
.ts-wrapper.multi .ts-control > .item.active {
    background: var(--brand-100);
    border-color: var(--brand-300);
}
.ts-wrapper.multi .ts-control > .item .remove {
    border: 0;
    color: var(--brand-700);
    opacity: .6;
    padding: 0 4px;
    margin-left: 2px;
    font-size: 14px;
    border-radius: 4px;
    transition: opacity .12s, color .12s, background-color .12s;
}
.ts-wrapper.multi .ts-control > .item .remove:hover {
    opacity: 1;
    color: #B91C1C;
    background: rgba(220, 38, 38, .08);
}

/* Dropdown */
.ts-wrapper { position: relative; z-index: 1; }
.ts-wrapper.focus { z-index: 50; } /* lift above neighbouring cards that create stacking contexts via transform */
.ts-dropdown {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 6px;
    padding: .25rem;
    font-size: .875rem;
    color: var(--ink-700);
    animation: pop-in .16s var(--ease);
    z-index: 100 !important;
}
.ts-dropdown .option,
.ts-dropdown .optgroup-header {
    padding: .55rem .7rem;
    border-radius: var(--radius-sm);
    color: var(--ink-700);
    cursor: pointer;
}
.ts-dropdown .optgroup-header {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-400);
    padding-bottom: .25rem;
    cursor: default;
}
.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background: var(--brand-50);
    color: var(--brand-800);
}
.ts-dropdown .option.selected {
    background: var(--brand-100);
    color: var(--brand-800);
    font-weight: 500;
}
.ts-dropdown .option.selected.active {
    background: var(--brand-200);
}
.ts-dropdown .no-results,
.ts-dropdown .create {
    padding: .75rem .7rem;
    color: var(--ink-500);
    font-size: .8rem;
}
.ts-dropdown .spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid var(--brand-200);
    border-top-color: var(--brand-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Single-select clear button */
.ts-wrapper.single .clear-button {
    color: var(--ink-400);
    padding: 0 .4rem;
    font-size: 14px;
    opacity: .7;
}
.ts-wrapper.single .clear-button:hover { opacity: 1; color: #B91C1C; }

.ts-wrapper.single .ts-control > .item {
    color: var(--ink-900);
    padding: 0;
    margin: 0;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2rem .55rem; border-radius: 9999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .02em;
    border: 1px solid transparent;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 9999px; background: currentColor; opacity: .7; }
.badge-success { background: #ECFDF3; color: #0B7A3C; border-color: #BBF7D0; }
.badge-warning { background: #FFF6E5; color: #9A4B00; border-color: #FED7AA; }
.badge-danger  { background: #FEF1F1; color: #B91C1C; border-color: #FECACA; }
.badge-info    { background: #EEF4FF; color: #1D4ED8; border-color: #C7D7FE; }
.badge-muted   { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.badge-brand   { background: var(--brand-100); color: var(--brand-800); border-color: var(--brand-200); }

/* ---------- Tables ---------- */
.table-clean { min-width: 100%; font-size: .875rem; border-collapse: separate; border-spacing: 0; }
.table-clean thead th {
    padding: .75rem 1rem; text-align: left;
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-500);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}
.table-clean thead th:first-child { border-top-left-radius: var(--radius-lg); }
.table-clean thead th:last-child  { border-top-right-radius: var(--radius-lg); }
.table-clean tbody td {
    padding: .9rem 1rem;
    color: var(--ink-700);
    border-bottom: 1px solid var(--border);
}
.table-clean tbody tr { transition: background-color .12s var(--ease); }
.table-clean tbody tr:hover { background: rgba(244, 248, 242, .7); }
.table-clean tbody tr:last-child td { border-bottom: 0; }
.row-actions { opacity: .35; transition: opacity .15s var(--ease); }
.table-clean tbody tr:hover .row-actions { opacity: 1; }

/* ---------- Sidebar & Topbar ---------- */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #3F5A35 0%, #2F4228 100%);
    color: #E6EFE0;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 24px -16px rgba(31, 44, 27, .35);
    flex-shrink: 0;
}
@media (max-width: 1023.98px) {
    .sidebar {
        box-shadow: 8px 0 40px -10px rgba(0, 0, 0, .35);
    }
}
.sidebar::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(600px 400px at 90% -10%, rgba(168, 197, 143, .12), transparent 60%);
}
.sidebar-brand {
    height: 64px; display: flex; align-items: center; gap: .65rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: relative; z-index: 1;
}
.sidebar-brand-logo {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #7FA36B 0%, #5E7D4D 100%);
    display: grid; place-items: center; color: #fff; font-weight: 700;
    box-shadow: 0 8px 16px -8px rgba(127, 163, 107, .6), inset 0 1px 0 rgba(255,255,255,.25);
}

.sidebar-brand-badge {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 16px -8px rgba(127, 163, 107, .6), inset 0 1px 0 rgba(255,255,255,.25);
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-nav {
    flex: 1; padding: 1rem .75rem; overflow-y: auto;
    display: flex; flex-direction: column; gap: .2rem;
    position: relative; z-index: 1;
}
.nav-item {
    position: relative;
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .8rem;
    border-radius: var(--radius-sm);
    font-size: .88rem; color: #CDE0BF;
    transition: all .18s var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(127, 163, 107, .22) 0%, rgba(127, 163, 107, .05) 100%);
    color: #fff; font-weight: 500;
}
.nav-item.active::before {
    content: ''; position: absolute; left: -.75rem; top: 20%; bottom: 20%;
    width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #A8C58F, #7FA36B);
    box-shadow: 0 0 12px rgba(168, 197, 143, .5);
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; }
.nav-item:hover svg { opacity: 1; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    height: 64px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(231, 236, 228, .8);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 .75rem;
    gap: .5rem;
}
@media (min-width: 768px) {
    .topbar { padding: 0 1.5rem; gap: 1rem; }
}

.icon-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
    color: var(--ink-500);
    background: transparent; border: 0;
    transition: background-color .15s var(--ease), color .15s var(--ease);
    cursor: pointer;
}
.icon-btn:hover { background: var(--brand-50); color: var(--brand-700); }
.icon-btn .dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; border-radius: 9999px;
    background: #EF5B5B; border: 2px solid #fff;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 91, 91, .6); }
    50%      { box-shadow: 0 0 0 6px rgba(239, 91, 91, 0); }
}

.avatar {
    width: 34px; height: 34px; border-radius: 9999px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #7FA36B 0%, #5E7D4D 100%);
    font-weight: 600; font-size: .78rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}

.dropdown-menu {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: .25rem;
    animation: pop-in .16s var(--ease);
}
@keyframes pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .7rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    color: var(--ink-700);
    width: 100%; text-align: left;
    transition: background-color .12s var(--ease);
}
.dropdown-item:hover { background: var(--brand-50); color: var(--brand-800); }
.dropdown-item.danger { color: #B91C1C; }
.dropdown-item.danger:hover { background: #FEF1F1; color: #B91C1C; }

/* ---------- Stat card ---------- */
.stat-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff 0%, rgba(247, 248, 246, .8) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(200px 140px at 100% 0%, rgba(127, 163, 107, .14), transparent 60%);
    pointer-events: none;
}
.stat-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-100), var(--brand-200));
    color: var(--brand-700);
    display: grid; place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.stat-value { font-size: 1.875rem; font-weight: 600; color: var(--ink-900); letter-spacing: -.02em; }
.stat-label { font-size: .8125rem; color: var(--ink-500); }

/* ---------- Timeline (activity) ---------- */
.timeline { position: relative; padding-left: 1.25rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--brand-200), transparent); border-radius: 2px; }
.timeline-item { position: relative; padding: .25rem 0 1rem; }
.timeline-item::before { content: ''; position: absolute; left: -1.25rem; top: .55rem; width: 12px; height: 12px; border-radius: 9999px; background: #fff; border: 2px solid var(--brand-400); box-shadow: 0 0 0 3px var(--brand-50); }

/* ---------- Empty state ---------- */
.empty-state {
    padding: 3rem 1.5rem; text-align: center;
    color: var(--ink-500);
}
.empty-state .icon-wrap {
    width: 72px; height: 72px; margin: 0 auto 1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
    display: grid; place-items: center;
    color: var(--brand-500);
}

/* ---------- Animations ---------- */
.animate-in { animation: fade-up .4s var(--ease) both; }
.animate-in-delay-1 { animation-delay: .05s; }
.animate-in-delay-2 { animation-delay: .1s; }
.animate-in-delay-3 { animation-delay: .15s; }
.animate-in-delay-4 { animation-delay: .2s; }
@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Auth / Guest ---------- */
.auth-bg {
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(700px 500px at 10% 10%, rgba(127, 163, 107, .35), transparent 60%),
        radial-gradient(700px 500px at 90% 90%, rgba(63, 90, 53, .25), transparent 60%),
        linear-gradient(180deg, #F4F8F2 0%, #E6EFE0 100%);
}
.auth-bg::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(168, 197, 143, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 197, 143, .08) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.auth-card {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(231, 236, 228, .9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.5) inset;
    padding: 2rem;
    transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.auth-card:hover {
    box-shadow: 0 30px 60px -20px rgba(63, 90, 53, .3), 0 0 0 1px rgba(255,255,255,.6) inset;
}
.auth-logo {
    width: 56px; height: 56px; border-radius: 16px;
    background: linear-gradient(135deg, #7FA36B 0%, #3F5A35 100%);
    display: grid; place-items: center;
    color: #fff; font-weight: 700; font-size: 1.05rem;
    box-shadow: 0 18px 30px -12px rgba(63, 90, 53, .5), inset 0 1px 0 rgba(255,255,255,.3);
    margin: 0 auto;
}

/* Hero image panel (desktop login split-screen) */
.auth-hero-bg {
    position: absolute; inset: 0;
    background-image: url('/timpaysage/public/assets/backgrounds/background-img3.png');
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: ken-burns 20s ease-in-out infinite alternate;
    filter: saturate(.9);
}
@keyframes ken-burns {
    0%   { transform: scale(1.05) translate(0, 0); }
    100% { transform: scale(1.15) translate(-2%, -2%); }
}
.auth-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(47, 66, 40, .75) 0%, rgba(63, 90, 53, .6) 50%, rgba(94, 125, 77, .55) 100%);
}
.auth-hero-logo img {
    filter: brightness(0) invert(1);
    opacity: .95;
}

/* Floating leaves decoration */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-14px) rotate(6deg); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

/* ---------- Dashboard hero banner ---------- */
.hero-banner {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 180px;
    box-shadow: 0 20px 40px -20px rgba(63, 90, 53, .35);
}
.hero-banner-bg {
    position: absolute; inset: 0;
    background-image: url('/timpaysage/public/assets/backgrounds/background-img7.png');
    background-size: cover;
    background-position: center 40%;
    transform: scale(1.02);
    transition: transform 1.2s var(--ease);
}
.hero-banner:hover .hero-banner-bg {
    transform: scale(1.06);
}
.hero-banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(110deg, rgba(31, 44, 27, .82) 0%, rgba(47, 66, 40, .72) 40%, rgba(63, 90, 53, .4) 100%);
}
.hero-leaf {
    position: absolute;
    pointer-events: none;
    opacity: .25;
}
.hero-leaf-1 { top: 12%; right: 8%; width: 52px; height: 52px; }
.hero-leaf-2 { bottom: 16%; right: 25%; width: 34px; height: 34px; opacity: .18; }

/* Playful sidebar nav icon hover */
.nav-item svg { transition: transform .25s var(--ease), opacity .15s var(--ease); }
.nav-item:hover svg { transform: translateX(2px) rotate(-3deg); }

/* Dashboard shortcut tile icon wobble */
.shortcut-tile svg { transition: transform .25s var(--ease); }
.shortcut-tile:hover svg { transform: scale(1.15) rotate(6deg); }

/* ---------- Misc ---------- */
[x-cloak] { display: none !important; }

/* ==========================================================================
   Density preference — applied via <body data-density="compact|cozy|comfortable">
   ========================================================================== */

/* Compact: tighter spacing, denser tables, smaller cards */
body[data-density="compact"] .table-clean thead th { padding: .5rem .8rem; font-size: .68rem; }
body[data-density="compact"] .table-clean tbody td { padding: .55rem .8rem; }
body[data-density="compact"] .card { border-radius: var(--radius-md); }
body[data-density="compact"] .stat-card { padding: .85rem; }
body[data-density="compact"] .stat-value { font-size: 1.5rem; }
body[data-density="compact"] .input { padding: .4rem .65rem; font-size: .82rem; }
body[data-density="compact"] .btn { padding: .4rem .85rem; font-size: .82rem; }
body[data-density="compact"] .badge { padding: .15rem .45rem; font-size: .68rem; }
body[data-density="compact"] main { padding-top: .75rem; padding-bottom: .75rem; }
body[data-density="compact"] main > * + * { margin-top: .75rem; }

/* Comfortable: airier spacing, larger cards, more padding */
body[data-density="comfortable"] .table-clean thead th { padding: 1rem 1.25rem; }
body[data-density="comfortable"] .table-clean tbody td { padding: 1.15rem 1.25rem; }
body[data-density="comfortable"] .stat-card { padding: 1.65rem; }
body[data-density="comfortable"] .stat-value { font-size: 2.15rem; }
body[data-density="comfortable"] .input { padding: .7rem .95rem; }
body[data-density="comfortable"] .btn { padding: .7rem 1.25rem; }
body[data-density="comfortable"] .card { border-radius: var(--radius-xl); }
body[data-density="comfortable"] main { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.scrollbar-slim::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar-slim::-webkit-scrollbar-thumb { background: rgba(94, 125, 77, .3); border-radius: 8px; }
.scrollbar-slim::-webkit-scrollbar-thumb:hover { background: rgba(94, 125, 77, .5); }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 1rem 0; }

/* ---------- Toasts (SweetAlert2 custom skin) ---------- */
.swal2-container.swal2-top-end { padding: 1rem !important; }

.swal2-toast.toast {
    background: #fff !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 14px 18px 14px 16px !important;
    font-family: inherit !important;
    min-width: 320px !important;
    max-width: 420px !important;
    position: relative !important;
    overflow: hidden !important;
}
.swal2-toast.toast::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: var(--brand-500);
}
/* Hide the input / textarea / select / actions that SweetAlert2 renders by default inside toasts */
.swal2-toast .swal2-input,
.swal2-toast .swal2-file,
.swal2-toast .swal2-range,
.swal2-toast .swal2-select,
.swal2-toast .swal2-radio,
.swal2-toast .swal2-checkbox,
.swal2-toast .swal2-textarea,
.swal2-toast .swal2-validation-message,
.swal2-toast .swal2-actions,
.swal2-toast .swal2-footer,
.swal2-toast .swal2-close,
.swal2-toast .swal2-loader,
.swal2-toast .swal2-progress-steps,
.swal2-toast .swal2-image,
/* Tom Select artifacts if any got wrapped before the JS guard landed */
.swal2-toast .ts-wrapper,
.swal2-toast .ts-dropdown,
.swal2-popup .ts-wrapper,
.swal2-popup .ts-dropdown {
    display: none !important;
}
.swal2-toast .swal2-html-container:empty { display: none !important; }
.swal2-toast.toast-success::before { background: #16A34A; }
.swal2-toast.toast-error::before   { background: #DC2626; }
.swal2-toast.toast-warning::before { background: #D97706; }
.swal2-toast.toast-info::before    { background: #2563EB; }
.swal2-toast.toast-loading::before { background: var(--brand-500); }

.swal2-toast .swal2-title {
    font-size: .88rem !important;
    font-weight: 500 !important;
    color: var(--ink-900) !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -.01em !important;
    line-height: 1.4 !important;
}

.swal2-toast .swal2-icon {
    width: 28px !important;
    height: 28px !important;
    margin: 0 12px 0 2px !important;
    border-width: 2px !important;
    flex-shrink: 0;
}
.swal2-toast .swal2-icon .swal2-icon-content { font-size: 1.1rem !important; }
.swal2-toast .swal2-success-ring { width: 28px !important; height: 28px !important; }
.swal2-toast .swal2-success-line-tip,
.swal2-toast .swal2-success-line-long { height: 2px !important; }

.swal2-toast .swal2-timer-progress-bar-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important; right: 0 !important;
    height: 2px !important;
    background: transparent !important;
    border-radius: 0 !important;
}
.swal2-toast .swal2-timer-progress-bar {
    background: var(--brand-400) !important;
    opacity: .6 !important;
    border-radius: 0 !important;
}
.swal2-toast.toast-success .swal2-timer-progress-bar { background: #16A34A !important; }
.swal2-toast.toast-error   .swal2-timer-progress-bar { background: #DC2626 !important; }
.swal2-toast.toast-warning .swal2-timer-progress-bar { background: #D97706 !important; }
.swal2-toast.toast-info    .swal2-timer-progress-bar { background: #2563EB !important; }

/* Confirmation modal polish */
.swal2-popup:not(.swal2-toast) {
    border-radius: var(--radius-lg) !important;
    padding: 1.5rem !important;
    font-family: inherit !important;
}
.swal2-popup .swal2-title {
    font-size: 1.125rem !important;
    color: var(--ink-900) !important;
    font-weight: 600 !important;
}
.swal2-popup .swal2-html-container {
    font-size: .875rem !important;
    color: var(--ink-500) !important;
}
.swal2-popup .swal2-actions { gap: .5rem !important; margin-top: 1rem !important; }
.swal2-popup .swal2-confirm,
.swal2-popup .swal2-cancel {
    padding: .55rem 1.1rem !important;
    border-radius: var(--radius-sm) !important;
    font-size: .875rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Stitch "Curated Landscape" components — for Block 2+
   ========================================================================== */

.font-headline { font-family: 'Manrope', 'Inter', ui-sans-serif, system-ui, sans-serif; letter-spacing: -.02em; }

/* Material Symbols — explicit font-family + ligature support, defence-in-depth */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', 'Material Icons', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined.fill  { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.material-symbols-outlined.sm    { font-size: 16px; }
.material-symbols-outlined.lg    { font-size: 28px; }
.material-symbols-outlined.xl    { font-size: 40px; }

/* Entity ribbon — 4px vertical accent to mark a row/card as TIM vs TPVR */
.entity-ribbon {
    display: inline-block;
    width: 4px;
    flex-shrink: 0;
    border-radius: 9999px;
}
.entity-ribbon-sm  { height: 16px; }
.entity-ribbon-md  { height: 24px; }
.entity-ribbon-lg  { height: 32px; }
.entity-ribbon-tim  { background: var(--stitch-primary); }
.entity-ribbon-tpvr { background: var(--stitch-tertiary); }
.entity-ribbon-auto { /* fallback: uses --entity-color inline style */ background: var(--entity-color, var(--stitch-primary)); }

.entity-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.entity-tag-tim  { color: var(--stitch-primary); }
.entity-tag-tpvr { color: var(--stitch-tertiary); }

/* Contract badges (CDI green, CDD softer, Intérim / Apprenti neutral, Stage info) */
.contract-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .25rem .75rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
}
.contract-badge-cdi   { background: var(--stitch-secondary-container); color: var(--stitch-on-secondary-container); }
.contract-badge-cdd   { background: #dce5d6; color: #41493e; }
.contract-badge-int   { background: #fff4e5; color: #8a4b00; }
.contract-badge-app   { background: var(--surface-container-highest); color: var(--ink-700); }
.contract-badge-stg   { background: #e0eaff; color: #1d4ed8; }

/* Status dot + text (Actif / Inactif) */
.status-dot {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .8rem; font-weight: 500;
}
.status-dot::before {
    content: ''; width: 8px; height: 8px; border-radius: 9999px;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 20%, transparent);
}
.status-dot.actif    { color: var(--stitch-primary); }
.status-dot.inactif  { color: var(--outline-variant); }
.status-dot.pending  { color: #D97706; }
.status-dot.expired  { color: #B91C1C; }

/* Stitch-style surface cards (no 1px borders, tonal layering) */
.surface-card {
    background: var(--surface-container-lowest);
    border-radius: 1.5rem; /* rounded-3xl */
    box-shadow: 0 0 0 1px rgba(195, 200, 189, .15);
    overflow: hidden;
}
.surface-card-low  { background: var(--surface-container-low); border-radius: 1.5rem; }
.surface-card-high { background: var(--surface-container-high); border-radius: 1.5rem; }

/* Stitch table */
.stitch-table { width: 100%; text-align: left; border-collapse: collapse; }
.stitch-table thead tr { background: rgba(242, 244, 241, .5); }
.stitch-table thead th {
    padding: 1rem 1.5rem;
    font-family: 'Manrope', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    color: var(--ink-700);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.stitch-table tbody td { padding: 1rem 1.5rem; color: var(--ink-900); }
.stitch-table tbody tr {
    border-bottom: 1px solid rgba(195, 200, 189, .15);
    transition: background-color .2s var(--ease);
}
.stitch-table tbody tr:hover { background: var(--surface-container-low); }
.stitch-table tbody tr:last-child { border-bottom: 0; }
.stitch-table .row-actions { opacity: 0; transition: opacity .15s var(--ease); }
.stitch-table tbody tr:hover .row-actions { opacity: 1; }

/* Avatar cell: narrow fixed-width column that doesn't inherit the big horizontal padding */
.stitch-table td.avatar-cell,
.stitch-table th.avatar-cell {
    width: 72px;
    min-width: 72px;
    padding: .65rem 0 .65rem 1.5rem !important;
}
.stitch-table .avatar-thumb {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--surface-container-lowest);
    background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    transition: transform .2s var(--ease);
}
.stitch-table .avatar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stitch-table tbody tr:hover .avatar-thumb { transform: scale(1.08); }

/* Stitch bento stat block */
.bento-stat {
    padding: 1.5rem;
    background: var(--surface-container-low);
    border-radius: 1.5rem;
    display: flex; flex-direction: column; gap: .5rem;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.bento-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bento-stat-label {
    font-size: .72rem; font-weight: 700;
    color: var(--ink-700);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.bento-stat-value {
    font-family: 'Manrope', sans-serif;
    font-size: 2.5rem; font-weight: 800;
    color: var(--ink-900);
    letter-spacing: -.03em;
    line-height: 1;
}
.bento-stat-delta {
    font-size: .75rem; font-weight: 700;
    color: var(--stitch-primary);
}
.bento-stat-highlight {
    background: linear-gradient(135deg, var(--stitch-primary) 0%, var(--stitch-primary-container) 100%);
    color: #fff;
    box-shadow: 0 18px 30px -12px rgba(51, 79, 43, .35);
}
.bento-stat-highlight .bento-stat-label,
.bento-stat-highlight .bento-stat-value,
.bento-stat-highlight .bento-stat-delta { color: #fff; }

/* Stitch primary gradient button (override) */
.btn-stitch {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.5rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--stitch-primary) 0%, var(--stitch-primary-container) 100%);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .88rem;
    border: 0;
    cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
    box-shadow: 0 6px 16px -6px rgba(51, 79, 43, .4);
}
.btn-stitch:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -8px rgba(51, 79, 43, .5); }
.btn-stitch:active { transform: translateY(0); filter: brightness(.95); }

.btn-stitch-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--surface-container-high);
    color: var(--ink-900);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .88rem;
    border: 0;
    cursor: pointer;
    transition: background-color .18s var(--ease);
}
.btn-stitch-secondary:hover { background: var(--surface-container-highest); }

/* Kbd-like chip for keyboard shortcuts */
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; padding: .1rem .35rem; border-radius: .3rem; background: #fff; border: 1px solid var(--border); color: var(--ink-500); box-shadow: 0 1px 0 var(--border); }

/* ==========================================================================
   Form inputs — global restyle (no Tailwind Forms plugin needed)
   ========================================================================== */

/* Textarea inherits .input, add min-height + resize control */
textarea.input { min-height: 88px; resize: vertical; line-height: 1.5; }

/* Number — remove browser spinners */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Date / time — keep native picker, but tint the icon and focus ring */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] {
    color-scheme: light;
    font-family: inherit;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .65;
    filter: invert(32%) sepia(22%) saturate(600%) hue-rotate(64deg) brightness(95%);
    transition: opacity .15s var(--ease);
}
input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }

/* Search — hide browser clear button (we use custom) */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { appearance: none; -webkit-appearance: none; }

/* File input */
input[type="file"] {
    display: block;
    width: 100%;
    font-size: .875rem;
    color: var(--ink-700);
    cursor: pointer;
    padding: 0;
    background: transparent;
}
input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: .55rem 1rem;
    border-radius: var(--radius-sm);
    border: 0;
    background: var(--brand-50);
    color: var(--brand-700);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s var(--ease), color .15s var(--ease);
    box-shadow: inset 0 0 0 1px var(--brand-200);
}
input[type="file"]::file-selector-button:hover {
    background: var(--brand-500);
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--brand-500);
}

/* Custom file input wrapper — drag & drop hint */
.file-dropzone {
    display: flex; align-items: center; gap: 12px;
    padding: 1rem;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.file-dropzone:hover, .file-dropzone.is-dragging {
    border-color: var(--brand-400);
    background: var(--brand-50);
}

/* ---------- Checkbox ---------- */
input[type="checkbox"]:not(.no-theme) {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid #CBD5D1;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all .15s var(--ease);
    flex-shrink: 0;
    vertical-align: middle;
    display: inline-grid;
    place-content: center;
    margin: 0;
}
input[type="checkbox"]:not(.no-theme):hover:not(:disabled) { border-color: var(--brand-400); }
input[type="checkbox"]:not(.no-theme):checked {
    background: linear-gradient(180deg, #6B8A5A 0%, #5E7D4D 100%);
    border-color: var(--brand-500);
    box-shadow: 0 2px 4px -1px rgba(63, 90, 53, .3);
}
input[type="checkbox"]:not(.no-theme):checked::after {
    content: '';
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    animation: check-pop .2s var(--ease);
}
@keyframes check-pop {
    0%   { transform: rotate(45deg) scale(0) translate(-1px, -1px); opacity: 0; }
    100% { transform: rotate(45deg) scale(1) translate(-1px, -1px); opacity: 1; }
}
input[type="checkbox"]:not(.no-theme):indeterminate {
    background: linear-gradient(180deg, #6B8A5A 0%, #5E7D4D 100%);
    border-color: var(--brand-500);
}
input[type="checkbox"]:not(.no-theme):indeterminate::after {
    content: ''; width: 10px; height: 2px; background: #fff; border: 0; border-radius: 1px;
    transform: none;
    animation: none;
}
input[type="checkbox"]:not(.no-theme):focus-visible {
    outline: none;
    box-shadow: var(--shadow-glow);
}
input[type="checkbox"]:not(.no-theme):disabled {
    opacity: .5;
    cursor: not-allowed;
    background: #F3F4F6;
}

/* ---------- Radio ---------- */
input[type="radio"]:not(.no-theme) {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid #CBD5D1;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all .15s var(--ease);
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0;
}
input[type="radio"]:not(.no-theme):hover:not(:disabled) { border-color: var(--brand-400); }
input[type="radio"]:not(.no-theme):checked {
    border-color: var(--brand-500);
}
input[type="radio"]:not(.no-theme):checked::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: linear-gradient(180deg, #6B8A5A 0%, #5E7D4D 100%);
    animation: check-pop .2s var(--ease);
}
input[type="radio"]:not(.no-theme):focus-visible {
    outline: none;
    box-shadow: var(--shadow-glow);
}
input[type="radio"]:not(.no-theme):disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ---------- Toggle (switch) — for booleans ---------- */
.toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.toggle input[type="checkbox"] {
    position: absolute; opacity: 0;
    width: 0; height: 0;
    pointer-events: none;
}
.toggle-track {
    position: relative;
    display: inline-block;
    width: 40px; height: 22px;
    background: #CBD5D1;
    border-radius: 999px;
    flex-shrink: 0;
    transition: background-color .2s var(--ease);
}
.toggle-track::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    transition: transform .2s var(--ease);
}
.toggle input:checked + .toggle-track {
    background: linear-gradient(180deg, #6B8A5A 0%, #5E7D4D 100%);
}
.toggle input:checked + .toggle-track::after {
    transform: translateX(18px);
}
.toggle input:focus-visible + .toggle-track {
    box-shadow: var(--shadow-glow);
}
.toggle input:disabled + .toggle-track {
    opacity: .5;
    cursor: not-allowed;
}
.toggle-label {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    font-size: .875rem;
    color: var(--ink-800, var(--ink-700));
}
.toggle-label .toggle-hint {
    font-size: .72rem;
    color: var(--ink-500);
    font-weight: 400;
}

/* ---------- Field groups & helpers ---------- */
.field-error {
    display: block;
    font-size: .75rem;
    color: #B91C1C;
    margin-top: 4px;
}
.field-hint {
    display: block;
    font-size: .72rem;
    color: var(--ink-500);
    margin-top: 4px;
}
.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}
.input-group > .input {
    border-radius: 0;
}
.input-group > .input:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.input-group > .input:last-child  { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }
.input-addon {
    display: inline-flex; align-items: center;
    padding: 0 .75rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--ink-500);
    font-size: .875rem;
}
.input-addon:first-child { border-right: 0; border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.input-addon:last-child  { border-left: 0;  border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }

/* ---------- Password strength indicator ---------- */
.password-strength { font-size: .75rem; }
.ps-bar {
    height: 6px;
    background: #EEF1EC;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.ps-bar-fill {
    height: 100%;
    width: 0;
    background: #E5E7EB;
    border-radius: 999px;
    transition: width .25s var(--ease), background-color .25s var(--ease);
}
.ps-bar-fill.level-1 { background: #EF4444; }
.ps-bar-fill.level-2 { background: #F97316; }
.ps-bar-fill.level-3 { background: #EAB308; }
.ps-bar-fill.level-4 { background: #84CC16; }
.ps-bar-fill.level-5 { background: #16A34A; }
.ps-label {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 6px;
    color: var(--ink-500);
    font-size: .7rem;
}
.ps-label-value { font-weight: 600; color: var(--ink-700); letter-spacing: .02em; }
.ps-bar-fill.level-1 ~ .ps-label .ps-label-value,
.password-strength:has(.ps-bar-fill.level-1) .ps-label-value { color: #B91C1C; }
.password-strength:has(.ps-bar-fill.level-2) .ps-label-value { color: #C2410C; }
.password-strength:has(.ps-bar-fill.level-3) .ps-label-value { color: #A16207; }
.password-strength:has(.ps-bar-fill.level-4) .ps-label-value { color: #4D7C0F; }
.password-strength:has(.ps-bar-fill.level-5) .ps-label-value { color: #15803D; }
.ps-rules {
    list-style: none; padding: 0; margin: 8px 0 0;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
    font-size: .7rem;
}
.ps-rules li {
    position: relative; padding-left: 18px;
    color: var(--ink-500);
    transition: color .2s var(--ease);
}
.ps-rules li::before {
    content: ''; position: absolute; left: 0; top: 3px;
    width: 12px; height: 12px;
    border: 1.5px solid #CBD5D1;
    border-radius: 999px;
    background: #fff;
    transition: all .2s var(--ease);
}
.ps-rules li.ok { color: #15803D; }
.ps-rules li.ok::before {
    background: #16A34A;
    border-color: #16A34A;
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 0 transparent;
}
@media (max-width: 480px) {
    .ps-rules { grid-template-columns: 1fr; }
}
