@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   CSS VARIABLES

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {

    color-scheme: dark;

    

    /* Base Palette - Anthracite VS Code Style */

    --bg-primary: #1e1e1e;      /* fond principal */

    --bg-secondary: #252526;    /* cartes, panels, sidebar, navbar */

    --bg-tertiary: #2d2d2d;     /* inputs, hover, table headers */

    --bg-border: #3e3e42;       /* bordures subtiles */



    --text-primary: #d4d4d4;    /* texte principal */

    --text-secondary: #9d9d9d;  /* texte secondaire */

    --text-muted: #6b6b6b;      /* placeholders, labels */



    --accent-primary: #0078d4;  /* boutons, liens actifs */

    --accent-hover: #106ebe;    /* hover boutons */

    --accent-light: #1f3a5f;    /* backgrounds accent subtle */

    --accent-glow: rgba(0, 120, 212, 0.15); /* glow cards */



    /* Statuts */

    --success: #4ec9b0;         /* livré, OK */

    --warning: #dcdcaa;         /* en transit, attention */

    --danger: #f44747;          /* bloqué, alerte */

    --info: #569cd6;            /* info, blockchain */



    /* Functional Mappings */

    --bg: var(--bg-primary);

    --surface: var(--bg-secondary);

    --surface2: var(--bg-tertiary);

    --border: var(--bg-border);

    --text: var(--text-primary);

    --text2: var(--text-secondary);

    --text3: var(--text-muted);

    

    --accent: var(--accent-primary);

    --accent2: var(--accent-hover);

    --accent-soft: var(--accent-glow);

    

    --green: var(--success);

    --green-soft: rgba(78, 201, 176, 0.15);

    --red: var(--danger);

    --red-soft: rgba(244, 71, 71, 0.15);

    --orange: var(--warning);

    --orange-soft: rgba(220, 220, 170, 0.15);

    --purple: var(--info);

    --purple-soft: rgba(86, 156, 214, 0.15);



    /* Layout & Misc */

    --sidebar-w: 240px;

    --header-h: 64px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);

    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);

    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);

    --radius: 4px;

    --radius-sm: 4px;

    --transition: all 0.15s ease;



    /* legacy compat */

    --success-color: var(--success);

    --warning-color: var(--warning);

    --danger-color: var(--danger);

    --critical-color: #b91c1c;

    --accent-color: var(--accent-primary);

    --text-color: var(--text-primary);

    --glass-border: var(--bg-border);



    /* Status Colors (Premium Palette) */
    --status-arrive: #34d399;  /* Vert */
    --status-transit: #60a5fa; /* Bleu */
    --status-retard: #fbbf24;  /* Orange/Ambre */
    --status-bloque: #f87171;  /* Rouge */
    --status-litige: #a855f7;  /* Violet */

}



[data-theme="dark"] {

    color-scheme: dark;

}

/* Mode Daltonien (Protanopie / Deutéranopie: remplacement du rouge/vert par orange/bleu) */

body.colorblind-mode {

    --green: #2563eb;       /* Blue high vis */

    --green-soft: rgba(37, 99, 235, 0.1);

    --red: #d97706;         /* Orange high vis */

    --red-soft: rgba(217, 119, 6, 0.1);

    --success-color: #2563eb;

    --danger-color: #d97706;

    --warning-color: #d97706;

}



[data-theme="dark"] body.colorblind-mode,

body.colorblind-mode[data-theme="dark"] {

    --green-soft: rgba(37, 99, 235, 0.12);

    --red-soft: rgba(217, 119, 6, 0.12);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   RESET & BASE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

*,

*::before,

*::after {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}



body {

    font-family: 'Sora', sans-serif;

    background: var(--bg);

    color: var(--text);

    min-height: 100vh;

    line-height: 1.5;

    overflow-x: hidden;

    transition: background 0.3s, color 0.3s;

}



a {

    text-decoration: none;

    color: inherit;

}



button {

    font-family: 'Sora', sans-serif;

}



::-webkit-scrollbar {

    width: 6px;

    height: 6px;

}



::-webkit-scrollbar-track {

    background: var(--bg-primary);

}



::-webkit-scrollbar-thumb {

    background: var(--bg-border);

    border-radius: 3px;

}



/* Firefox scrollbar-color: thumb track */

* {

    scrollbar-color: var(--bg-border) var(--bg-primary);

    scrollbar-width: thin;

}



/* Firefox scrollbar-color: thumb track */

* {

    scrollbar-color: var(--bg-border) var(--bg-primary);

    scrollbar-width: thin;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   LAYOUT

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.container {

    display: flex;

    min-height: 100vh;

    width: 100%;

}

body {

    overflow-x: hidden;

}



.main-content {

    margin-left: var(--sidebar-w);

    flex: 1;

    display: flex;

    flex-direction: column;

    min-height: 100vh;

    min-width: 0;

}



.content {

    flex: 1;

    padding: 28px;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   SIDEBAR

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.sidebar {

    width: var(--sidebar-w);

    background: var(--surface);

    border-right: 1px solid var(--border);

    display: flex;

    flex-direction: column;

    position: fixed;

    top: 0;

    left: 0;

    bottom: 0;

    z-index: 100;

    overflow-y: auto;

}



.sidebar-logo {

    padding: 22px 18px 18px;

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    gap: 10px;

    flex-shrink: 0;

}



.logo-img {

    width: 32px;

    height: 32px;

    border-radius: 8px;

    object-fit: cover;

    flex-shrink: 0;

}



.logo-text {

    font-size: 1.1rem;

    font-weight: 700;

    color: var(--text);

    letter-spacing: -0.5px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    min-width: 0;

}



.logo-badge {

    margin-left: auto;

    font-size: 0.55rem;

    font-weight: 700;

    background: var(--accent-soft);

    color: var(--accent);

    padding: 2px 7px;

    border-radius: 4px;

    text-transform: uppercase;

    letter-spacing: 0.5px;

}



.sidebar-nav {

    flex: 1;

    padding-bottom: 8px;

}



.sidebar-section {

    padding: 16px 10px 4px;

}



.sidebar-label {

    font-size: 0.62rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;

    color: var(--text3);

    padding: 0 8px;

    margin-bottom: 4px;

}



.nav-link {

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 8px 10px;

    border-radius: 8px;

    color: var(--text2);

    font-size: 0.845rem;

    font-weight: 500;

    cursor: pointer;

    transition: var(--transition);

    margin-bottom: 1px;

    min-width: 0;

    /* Anti-overflow */

}



/* 4. SIDEBAR FADEUP ANIMATION */

@keyframes navFadeUp {

    from {

        opacity: 0;

        transform: translateY(8px);

    }



    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.sidebar .nav-link {

    opacity: 0;

    animation: navFadeUp 0.3s ease forwards;

}



.sidebar .nav-link:nth-child(1) {

    animation-delay: 0.1s;

}



.sidebar .nav-link:nth-child(2) {

    animation-delay: 0.15s;

}



.sidebar .nav-link:nth-child(3) {

    animation-delay: 0.2s;

}



.sidebar .nav-link:nth-child(4) {

    animation-delay: 0.25s;

}



.sidebar .nav-link:nth-child(5) {

    animation-delay: 0.3s;

}



.sidebar .nav-link:nth-child(6) {

    animation-delay: 0.35s;

}



.sidebar .nav-link:nth-child(7) {

    animation-delay: 0.4s;

}



.sidebar .nav-link:nth-child(8) {

    animation-delay: 0.45s;

}



.nav-link span:not(.nav-icon) {

    transition: transform 0.15s ease;

}



.nav-link:hover span:not(.nav-icon) {

    transform: translateX(3px);

}



.nav-link span {

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    min-width: 0;

}



.nav-link:hover {

    background: var(--surface2);

    color: var(--text);

}



.nav-link.active {

    background: var(--accent-soft);

    color: var(--accent);

    font-weight: 600;

}



.nav-icon {

    width: 17px;

    text-align: center;

    font-size: 0.82rem;

    flex-shrink: 0;

}



.nav-badge {

    margin-left: auto;

    font-size: 0.62rem;

    font-weight: 700;

    color: white;

    padding: 1px 6px;

    border-radius: 10px;

    font-family: 'JetBrains Mono', monospace;

    min-width: 18px;

    text-align: center;

    flex-shrink: 0;

}



.sidebar-footer {

    padding: 12px 10px 16px;

    border-top: 1px solid var(--border);

    flex-shrink: 0;

}



.theme-toggle-row {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 0 4px;

    margin-bottom: 10px;

}



.theme-switch {

    position: relative;

    width: 40px;

    height: 22px;

    flex-shrink: 0;

}



.theme-switch input {

    display: none;

}



.slider {

    position: absolute;

    inset: 0;

    background: var(--border);

    border-radius: 11px;

    cursor: pointer;

    transition: 0.3s;

}



.slider::before {

    content: '';

    position: absolute;

    width: 16px;

    height: 16px;

    left: 3px;

    top: 3px;

    background: white;

    border-radius: 50%;

    transition: 0.3s;

}



input:checked+.slider {

    background: var(--accent);

}



input:checked+.slider::before {

    transform: translateX(18px);

}



.user-mini {

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 8px;

    border-radius: 9px;

    cursor: pointer;

    transition: var(--transition);

}



.user-mini:hover {

    background: var(--surface2);

}



.user-avatar {

    width: 30px;

    height: 30px;

    border-radius: 50%;

    background: linear-gradient(135deg, var(--accent), var(--purple));

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.7rem;

    font-weight: 700;

    color: white;

    flex-shrink: 0;

}



.user-info {

    flex: 1;

    min-width: 0;

}



.user-name {

    font-size: 0.78rem;

    font-weight: 600;

    color: var(--text);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.user-role-text {

    font-size: 0.68rem;

    color: var(--text3);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   HEADER

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.header {

    height: var(--header-h);

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    padding: 0 28px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    position: sticky;

    top: 0;

    z-index: 50;

    flex-shrink: 0;

}



.header-left {

    display: flex;

    flex-direction: column;

    gap: 1px;

}

.header-title-group {

    display: flex;

    flex-direction: column;

    gap: 1px;

    min-width: 0;

}



.header-greeting {

    font-size: 0.72rem;

    color: var(--text3);

}



.header-title {

    font-size: 1.05rem;

    font-weight: 700;

    color: var(--text);

    letter-spacing: -0.3px;

    min-width: 0;

}



.header-right {

    display: flex;

    align-items: center;

    gap: 10px;

}



.status-pill {

    display: flex;

    align-items: center;

    gap: 6px;

    background: var(--green-soft);

    border: 1px solid rgba(0, 196, 140, 0.2);

    color: var(--green);

    padding: 5px 12px;

    border-radius: 20px;

    font-size: 0.73rem;

    font-weight: 600;

}



.status-dot {

    width: 6px;

    height: 6px;

    background: var(--green);

    border-radius: 50%;

    animation: pulse 2s infinite;

}



@keyframes pulse {



    0%,

    100% {

        opacity: 1;

        transform: scale(1);

    }



    50% {

        opacity: 0.5;

        transform: scale(0.8);

    }

}



.header-btn {

    width: 34px;

    height: 34px;

    border-radius: 8px;

    border: 1px solid var(--border);

    background: var(--surface);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    color: var(--text2);

    font-size: 0.82rem;

    transition: var(--transition);

}



.header-btn:hover {

    background: var(--surface2);

    color: var(--text);

}



.secondary-nav {

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    padding: 14px 28px;

    display: flex;

    justify-content: center;

}



.nav-actions {

    display: inline-flex;

    background: var(--surface2);

    padding: 5px;

    border-radius: 14px;

    gap: 6px;

    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   THEME TOGGLE PREMIUM

   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.theme-toggle-container {

    margin-bottom: 20px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 4px;

}



.theme-label {

    font-size: 0.8rem;

    color: var(--text3);

    font-weight: 500;

}



.theme-toggle-premium {

    cursor: pointer;

}



.theme-toggle-track {

    width: 52px;

    height: 26px;

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 20px;

    position: relative;

    transition: all 0.3s ease;

}



.theme-toggle-thumb {

    position: absolute;

    top: 2px;

    left: 2px;

    width: 20px;

    height: 20px;

    background: var(--surface);

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);

}



.theme-toggle-thumb i {

    font-size: 0.75rem;

    position: absolute;

    transition: all 0.3s ease;

}



.icon-sun { color: var(--orange); opacity: 1; transform: scale(1); }

.icon-moon { color: var(--accent); opacity: 0; transform: scale(0) rotate(-45deg); }



[data-theme="dark"] .theme-toggle-thumb {

    left: 28px;

    background: var(--bg);

}



[data-theme="dark"] .icon-sun { opacity: 0; transform: scale(0) rotate(45deg); }

[data-theme="dark"] .icon-moon { opacity: 1; transform: scale(1) rotate(0); }



.theme-toggle-track:hover {

    border-color: var(--accent);

    box-shadow: 0 0 0 3px var(--accent-soft);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   GLOBAL SEARCH (GOOGLE STYLE)

   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.header-search-container {

    position: relative;

    margin-right: 15px; /* Augmenté pour l'espacement avec Système actif */

}



.header-search-bar {

    display: flex;

    align-items: center;

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 10px; /* Plus carré comme Google Modern */

    padding: 0 12px;

    height: 40px;

    width: 240px;

    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    gap: 8px;

}



.header-search-bar:focus-within {

    width: 400px;

    background: var(--surface);

    border-color: var(--accent);

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

}



.header-search-bar i {

    color: var(--text3);

    font-size: 0.85rem;

}



.header-search-bar:focus-within i {

    color: var(--accent);

}



.header-search-bar input {

    border: none;

    background: transparent;

    color: var(--text);

    font-size: 0.9rem;

    width: 100%;

    outline: none;

}



.search-shortcut {

    font-size: 0.65rem;

    color: var(--text3);

    background: var(--bg);

    padding: 2px 4px;

    border-radius: 4px;

    opacity: 0.6;

}



.header-search-bar:focus-within .search-shortcut {

    display: none;

}



/* Overlay des résultats */

.search-results-overlay {

    position: absolute;

    top: calc(100% + 8px);

    right: 0;

    width: 500px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 12px;

    box-shadow: var(--shadow-lg);

    z-index: 1000;

    overflow: hidden;

    animation: searchFadeIn 0.2s ease-out;

}



@keyframes searchFadeIn {

    from { opacity: 0; transform: translateY(-5px); }

    to { opacity: 1; transform: translateY(0); }

}



.results-container {

    max-height: 500px;

    overflow-y: auto;

    padding: 8px 0;

}



.results-placeholder {

    padding: 40px 20px;

    text-align: center;

    color: var(--text3);

    font-size: 0.85rem;

}



.search-category {

    padding: 12px 16px 6px;

    font-size: 0.65rem;

    font-weight: 700;

    text-transform: uppercase;

    color: var(--text3);

    letter-spacing: 0.5px;

}



.search-item {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px 16px;

    cursor: pointer;

    transition: background 0.15s;

}



.search-item:hover {

    background: var(--surface2);

}



.search-item-icon {

    width: 36px;

    height: 36px;

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.9rem;

    flex-shrink: 0;

}



.search-item-info {

    flex: 1;

    min-width: 0;

}



.search-item-title {

    font-size: 0.88rem;

    font-weight: 600;

    color: var(--text);

    margin-bottom: 2px;

    display: flex;

    align-items: center;

    gap: 8px;

}



.search-item-sub {

    font-size: 0.75rem;

    color: var(--text3);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.search-loader {

    width: 14px;

    height: 14px;

    border: 2px solid var(--border);

    border-top-color: var(--accent);

    border-radius: 50%;

    animation: spin 0.8s linear infinite;

}



@keyframes spin {

    to { transform: rotate(360deg); }

}



.nav-action-btn {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    background: transparent;

    border: none;

    border-radius: 10px;

    padding: 8px 24px;

    font-size: 0.85rem;

    font-weight: 600;

    color: var(--text3);

    cursor: pointer;

    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);

    min-width: 130px;

}



.nav-action-btn:hover {

    color: var(--text);

}



.nav-action-btn.active {

    background: var(--surface);

    color: var(--text);

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);

}



/* Premium Inputs for Modals */

.input-premium {

    background: var(--surface2) !important;

    border: 1px solid var(--border) !important;

    border-radius: 10px !important;

    padding: 10px 14px !important;

    color: var(--text) !important;

    font-size: 0.9rem !important;

    transition: all 0.2s ease !important;

    width: 100% !important;

    box-sizing: border-box !important;

}



.input-premium:focus {

    background: var(--surface) !important;

    border-color: var(--accent) !important;

    box-shadow: 0 0 0 3px var(--accent-soft) !important;

    outline: none !important;

}



/* Dark mode specific for inputs */

[data-theme="dark"] .input-premium {

    background: rgba(255, 255, 255, 0.03) !important;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   VIEWS

   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.view-section {

    display: none;

    animation: fadeUp 0.3s ease;

}



.view-section.active {

    display: block;

}



@keyframes fadeUp {

    from {

        opacity: 0;

        transform: translateY(10px);

    }



    to {

        opacity: 1;

        transform: translateY(0);

    }

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   CARD

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.card {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 22px;

    box-shadow: var(--shadow-sm);

    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

}



.card:not(.table-card):hover {

    transform: translateY(-2px);

}



.card-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    margin-bottom: 20px;

}



.card-title {

    font-size: 0.93rem;

    font-weight: 700;

    color: var(--text);

    letter-spacing: -0.2px;

}



.card-sub {

    font-size: 0.72rem;

    color: var(--text3);

    margin-top: 2px;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   KPI GRID

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.kpi-grid {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 14px;

    margin-bottom: 20px;

}



.kpi-card {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 18px 20px;

    box-shadow: var(--shadow-sm);

    position: relative;

    overflow: hidden;

    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    animation: fadeUp 0.35s ease both;

    will-change: transform, box-shadow;

}



.kpi-card:hover {

    box-shadow: var(--shadow-lg);

    transform: translateY(-4px);

}



.kpi-card::before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 3px;

    border-radius: var(--radius) var(--radius) 0 0;

    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);

}



.kpi-card:hover::before {

    height: 5px;

}



.kpi-blue::before {

    background: var(--accent);

}



.kpi-green::before {

    background: var(--green);

}



.kpi-red::before {

    background: var(--red);

}



.kpi-purple::before {

    background: var(--purple);

}



.kpi-card:nth-child(1) {

    animation-delay: 0.05s;

}



.kpi-card:nth-child(2) {

    animation-delay: 0.1s;

}



.kpi-card:nth-child(3) {

    animation-delay: 0.15s;

}



.kpi-card:nth-child(4) {

    animation-delay: 0.2s;

}



.kpi-top {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    margin-bottom: 12px;

}



.kpi-label {

    font-size: 0.68rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.7px;

    color: var(--text3);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.kpi-icon {

    width: 32px;

    height: 32px;

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.82rem;

    flex-shrink: 0;

}



.kpi-icon-blue {

    background: var(--accent-soft);

    color: var(--accent);

}



.kpi-icon-green {

    background: var(--green-soft);

    color: var(--green);

}



.kpi-icon-red {

    background: var(--red-soft);

    color: var(--red);

}



.kpi-icon-purple {

    background: var(--purple-soft);

    color: var(--purple);

}



.kpi-value {

    font-size: 2.1rem;

    font-weight: 800;

    color: var(--text);

    letter-spacing: -2px;

    line-height: 1;

    margin-bottom: 8px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.kpi-trend {

    display: flex;

    align-items: center;

    gap: 5px;

    font-size: 0.73rem;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.trend-up {

    color: var(--green);

}



.trend-down {

    color: var(--red);

}



.trend-neutral {

    color: var(--text3);

}



.trend-label {

    color: var(--text3);

    font-weight: 400;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   QUICK ACTIONS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.quick-actions {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 10px;

    margin-bottom: 20px;

}



.quick-btn {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-sm);

    padding: 11px 14px;

    display: flex;

    align-items: center;

    gap: 10px;

    cursor: pointer;

    transition: all 0.2s ease;

    font-size: 0.8rem;

    font-weight: 600;

    color: var(--text);

    box-shadow: var(--shadow-sm);

    will-change: transform, box-shadow;

}



.quick-btn:hover {

    background: var(--surface2);

    border-color: var(--accent);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);

    transform: translateY(-3px);

}



.quick-btn:hover .qbtn-icon {

    transform: scale(1.15);

}



.qbtn-icon {

    width: 28px;

    height: 28px;

    border-radius: 7px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.78rem;

    flex-shrink: 0;

    transition: transform 0.2s ease;

}



.qbtn-blue {

    background: var(--accent-soft);

    color: var(--accent);

}



.qbtn-green {

    background: var(--green-soft);

    color: var(--green);

}



.qbtn-orange {

    background: var(--orange-soft);

    color: var(--orange);

}



.qbtn-purple {

    background: var(--purple-soft);

    color: var(--purple);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   CHARTS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.charts-row {

    display: grid;

    grid-template-columns: 1fr 320px;

    gap: 14px;

    margin-bottom: 20px;

}



.chart-card {

    padding: 20px;

    transition: transform 0.3s ease;

}



.chart-card:hover {

    transform: translateY(-3px);

}



.chart-card:hover #statusDistChart {

    transform: scale(1.02);

}



#statusDistChart {

    transition: transform 0.3s ease;

}



.period-select {

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 7px;

    padding: 4px 10px;

    font-size: 0.75rem;

    font-family: 'Sora', sans-serif;

    color: var(--text);

    cursor: pointer;

    outline: none;

}



.chart-wrap {

    position: relative;

    height: 320px;

}



.chart-wrap-donut {

    height: 320px;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   DASHBOARD BOTTOM

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.dash-bottom {

    display: grid;

    grid-template-columns: 1fr 280px;

    gap: 14px;

}



.activity-feed {

    display: flex;

    flex-direction: column;

}



.activity-item {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 0;

    border-bottom: 1px solid var(--border);

    transition: var(--transition);

}



.activity-item:last-child {

    border-bottom: none;

}



.act-icon {

    width: 30px;

    height: 30px;

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 0.75rem;

    flex-shrink: 0;

}



.act-body {

    flex: 1;

    min-width: 0;

}



.act-title {

    font-size: 0.8rem;

    font-weight: 600;

    color: var(--text);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.act-desc {

    font-size: 0.72rem;

    color: var(--text3);

    margin-top: 1px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.act-time {

    font-size: 0.68rem;

    color: var(--text3);

    font-family: 'JetBrains Mono', monospace;

    flex-shrink: 0;

}



/* AI dark widget */

.ai-dark-card {

    background: linear-gradient(135deg, #0f1117, #1a1f2e);

    border: 1px solid rgba(255, 255, 255, 0.06);

    border-radius: var(--radius);

    padding: 22px;

    box-shadow: var(--shadow);

    position: relative;

    overflow: hidden;

}



.ai-dark-card::before {

    content: '';

    position: absolute;

    top: -30px;

    right: -30px;

    width: 100px;

    height: 100px;

    background: radial-gradient(circle, rgba(0, 102, 255, 0.18), transparent 70%);

    pointer-events: none;

}



.ai-dot-wrap {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 14px;

}



.ai-dot {

    width: 7px;

    height: 7px;

    background: var(--green);

    border-radius: 50%;

    box-shadow: 0 0 6px var(--green);

    animation: pulse 2s infinite;

}



.ai-label {

    font-size: 0.65rem;

    font-weight: 600;

    color: rgba(255, 255, 255, 0.7);

    text-transform: uppercase;

    letter-spacing: 0.8px;

}



.ai-score {

    font-size: 2.8rem;

    font-weight: 800;

    color: white;

    letter-spacing: -3px;

    line-height: 1;

    margin-bottom: 3px;

}



.ai-score-label {

    font-size: 0.72rem;

    color: rgba(255, 255, 255, 0.7);

    margin-bottom: 22px;

}



.ai-bars {

    display: flex;

    flex-direction: column;

    gap: 8px;

}



.ai-bar-row {

    display: flex;

    align-items: center;

    gap: 8px;

}



.ai-bar-label {

    font-size: 0.65rem;

    color: rgba(255, 255, 255, 0.8);

    width: 78px;

    flex-shrink: 0;

}



.ai-track {

    flex: 1;

    height: 4px;

    background: rgba(255, 255, 255, 0.06);

    border-radius: 2px;

    overflow: hidden;

}



.ai-fill {

    height: 100%;

    border-radius: 2px;

    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);

}



.ai-bar-val {

    width: 35px;

    text-align: right;

    font-size: 0.7rem;

    font-weight: 700;

    color: white;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   PARCELS VIEW

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.search-bar-wrap {

    display: flex;

    align-items: center;

    gap: 12px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 40px;

    padding: 10px 20px;

    margin-bottom: 16px;

    box-shadow: var(--shadow-sm);

    max-width: 640px;

}



.search-icon {

    color: var(--text3);

    font-size: 0.85rem;

}



.search-input {

    flex: 1;

    border: none;

    background: transparent;

    font-family: 'Sora', sans-serif;

    font-size: 0.9rem;

    color: var(--text);

    outline: none;

}



.search-input::placeholder {

    color: var(--text3);

}



.filter-pills {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin-bottom: 20px;

}



.filter-pill {

    padding: 6px 14px;

    border-radius: 20px;

    border: 1px solid var(--border);

    background: var(--surface);

    font-size: 0.78rem;

    font-weight: 600;

    color: var(--text2);

    cursor: pointer;

    transition: var(--transition);

    font-family: 'Sora', sans-serif;

}



.filter-pill:hover {

    background: var(--surface2);

    color: var(--text);

}



.filter-pill.active {

    background: var(--accent-soft);

    border-color: rgba(0, 102, 255, 0.25);

    color: var(--accent);

}



.table-card {

    padding: 0;

    overflow: hidden;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   DATA TABLE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.data-table {

    width: 100%;

    border-collapse: collapse;

}



.data-table th {

    font-size: 0.66rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.6px;

    color: var(--text3);

    padding: 12px 16px;

    border-bottom: 1px solid var(--border);

    text-align: left;

    background: var(--surface2);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.data-table td {

    padding: 11px 16px;

    font-size: 0.8rem;

    color: var(--text2);

    border-bottom: 1px solid var(--border);

    vertical-align: middle;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    max-width: 200px;

    /* Force ellipsis on long strings */

}



.data-table tr:last-child td {

    border-bottom: none;

}



.data-table tbody tr:hover {

    background: var(--surface2);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   BADGES

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.badge {

    display: inline-flex;

    align-items: center;

    padding: 3px 9px;

    border-radius: 6px;

    font-size: 0.7rem;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    max-width: 120px;

}



.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.6;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Variantes Premium */
.status-transit {
  color: #60a5fa !important;
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}
.status-transit .status-dot { background: #60a5fa; }

.status-livre {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}
.status-livre .status-dot { background: #34d399; }

.status-bloque {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
}
.status-bloque .status-dot { background: #f87171; }

.status-attente {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}
.status-attente .status-dot { background: #fbbf24; }

.status-prepare {
  color: #a78bfa !important;
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.2) !important;
}
.status-prepare .status-dot { background: #a78bfa; }

/* Legacy aliases for compatibility */
.status-arrive, .badge-status-arrived {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
}
.status-arrive .status-dot, .badge-status-arrived .status-dot { background: #34d399; }

.status-retard, .badge-status-delayed {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}
.status-retard .status-dot, .badge-status-delayed .status-dot { background: #fbbf24; }

.status-litige, .badge-status-dispute, .badge-status-in-dispute {
  color: #a78bfa !important;
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.2) !important;
}
.status-litige .status-dot, .badge-status-dispute .status-dot, .badge-status-in-dispute .status-dot { background: #a78bfa; }



.badge-risk-low {

    background: var(--green-soft);

    color: var(--green);

}



.badge-risk-medium {

    background: var(--orange-soft);

    color: var(--orange);

}



.badge-risk-high {

    background: var(--red-soft);

    color: var(--red);

}



.badge-risk-critical {

    background: var(--red);

    color: white;

}



/* legacy compat */

.glass {

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 6px;

}



.btn-view-parcel,

.btn-take-photo {

    padding: 5px 10px !important;

    border-radius: 7px;

    border: 1px solid var(--border);

    background: var(--surface);

    cursor: pointer;

    color: var(--text2);

    font-size: 0.78rem;

    transition: var(--transition);

}



.btn-view-parcel:hover {

    background: var(--accent-soft);

    color: var(--accent);

    border-color: var(--accent);

}



.btn-take-photo:hover {

    background: var(--green-soft);

    color: var(--green);

    border-color: var(--green);

}



#notifications-feed {

    margin-bottom: 16px;

}



.notification-card {

    padding: 12px 16px;

    border-radius: 9px;

    background: var(--surface);

    margin-bottom: 8px;

    border: 1px solid var(--border);

    border-left: 3px solid var(--accent);

}



.notif-critical {

    border-left-color: var(--red);

    background: var(--red-soft);

}



.notif-warning {

    border-left-color: var(--orange);

    background: var(--orange-soft);

}



.notif-header {

    display: flex;

    justify-content: space-between;

    font-size: 0.72rem;

    color: var(--text3);

    margin-bottom: 4px;

}



.notif-body {

    font-size: 0.82rem;

    font-weight: 600;

    color: var(--text);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   SUPPLIER ORDERS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.so-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    margin-bottom: 20px;

}



.so-stats {

    display: flex;

    gap: 14px;

}



.mini-stat {

    display: flex;

    flex-direction: column;

    gap: 2px;

    min-width: 150px;

    min-height: 100px;

    justify-content: center;

}



.stat-label {

    font-size: 0.68rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    color: var(--text3);

}



.stat-value {

    font-size: 1.7rem;

    font-weight: 800;

    color: var(--text);

    letter-spacing: -1.5px;

    line-height: 1.1;

}



.so-layout {

    display: grid;

    grid-template-columns: 310px 1fr;

    gap: 16px;

}



.so-list-card {

    padding: 0;

    display: flex;

    flex-direction: column;

    max-height: calc(100vh - 230px);

}



.so-list-header {

    padding: 16px 18px;

    border-bottom: 1px solid var(--border);

    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-shrink: 0;

}



.so-list-header h3 {

    font-size: 0.9rem;

    font-weight: 700;

}



.so-list-body {

    flex: 1;

    overflow-y: auto;

    padding: 10px;

}



.order-item-card {

    padding: 12px 14px;

    border-radius: 9px;

    background: var(--surface2);

    border: 1px solid var(--border);

    cursor: pointer;

    transition: var(--transition);

    margin-bottom: 8px;

}



.order-item-card:hover,

.order-item-card.active {

    border-color: var(--accent);

    background: var(--accent-soft);

}



.order-meta {

    display: flex;

    justify-content: space-between;

    font-size: 0.7rem;

    color: var(--text3);

    margin-bottom: 4px;

}



.order-supplier {

    font-weight: 700;

    font-size: 0.88rem;

    color: var(--text);

    margin-bottom: 6px;

}



.so-detail-col {

    display: flex;

    flex-direction: column;

    gap: 16px;

}



.so-detail-top {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    margin-bottom: 20px;

}



.so-detail-id {

    font-size: 1.15rem;

    font-weight: 800;

    letter-spacing: -0.5px;

}



.so-actions {

    display: flex;

    gap: 8px;

}



.so-detail-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

}



.section-label {

    font-size: 0.68rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.6px;

    color: var(--text3);

    margin-bottom: 10px;

}



.email-status-box {

    padding: 12px 16px;

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 12px;

    font-size: 0.88rem;

    color: var(--text);

    display: flex;

    align-items: center;

    gap: 10px;

}



.email-status-box i {

    color: var(--accent);

    font-size: 1rem;

}



.history-log {

    display: flex;

    flex-direction: column;

    gap: 8px;

    max-height: 200px;

    overflow-y: auto;

}



.history-item {

    font-size: 0.78rem;

    padding-left: 10px;

    border-left: 2px solid var(--accent);

    color: var(--text2);

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   FORMULAIRE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.form-page {

    max-width: 860px;

    margin: 0 auto;

}



.form-page-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    margin-bottom: 28px;

}



.form-page-header h1 {

    font-size: 1.6rem;

    font-weight: 800;

    letter-spacing: -0.8px;

    margin-bottom: 4px;

}



.subtitle {

    font-size: 0.85rem;

    color: var(--text3);

}



.form-mode-tabs {

    display: flex;

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 9px;

    padding: 3px;

    gap: 2px;

}



.mode-tab {

    padding: 6px 14px;

    border-radius: 7px;

    border: none;

    background: transparent;

    font-size: 0.8rem;

    font-weight: 600;

    color: var(--text3);

    cursor: pointer;

    transition: var(--transition);

}



.mode-tab.active {

    background: var(--surface);

    color: var(--text);

    box-shadow: var(--shadow-sm);

}



.form-section {

    margin-bottom: 18px;

    padding: 22px;

}



.form-section-title {

    font-size: 0.7rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;

    margin-bottom: 18px;

    padding-bottom: 10px;

    border-bottom: 1px solid var(--border);

}



.blue-accent {

    color: var(--accent);

}



.orange-accent {

    color: var(--orange);

}



.purple-accent {

    color: var(--purple);

}



.green-accent {

    color: var(--green);

}



.form-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 16px;

}



.form-full {

    grid-column: span 2;

}



.form-group {

    display: flex;

    flex-direction: column;

    gap: 5px;

}



.form-group label {

    font-size: 0.75rem;

    font-weight: 600;

    color: var(--text3);

}



.form-actions {

    display: flex;

    gap: 10px;

    justify-content: flex-end;

    margin-top: 8px;

}



/* Drop zone */

.drop-zone-full {

    padding: 60px 40px;

    text-align: center;

    border: 2px dashed var(--border);

    border-radius: var(--radius);

    background: var(--surface);

    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);

    cursor: pointer;

    transition: var(--transition);

    display: flex;

    align-items: center;

    justify-content: center;

}



.drop-zone-full:hover,

.drop-zone-full.drag-over {

    border-color: var(--accent);

    background: var(--accent-soft);

}



.drop-zone-content i {

    font-size: 3.5rem;

    color: var(--accent);

    display: block;

    margin-bottom: 20px;

    opacity: 0.7;

}



.drop-zone-content h2 {

    font-size: 1.4rem;

    margin-bottom: 8px;

}



.drop-zone-content p {

    font-size: 0.88rem;

    color: var(--text3);

    margin-bottom: 20px;

}



.import-list {

    display: flex;

    flex-direction: column;

    gap: 8px;

}



.import-item {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 14px;

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 9px;

    font-size: 0.82rem;

}



.import-item-info {

    flex: 1;

    overflow: hidden;

}



.import-item-name {

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    display: block;

}



.import-item-count {

    font-size: 0.7rem;

    color: var(--text3);

    display: block;

}



.btn-remove-import {

    background: transparent;

    border: none;

    color: var(--red);

    cursor: pointer;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   SECURITY VIEW

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.security-layout {

    display: grid;

    grid-template-columns: 1fr 300px;

    gap: 16px;

}



.security-side {

    display: flex;

    flex-direction: column;

    gap: 16px;

}



.security-console {

    background: #0a0d14;

    color: #00ff9d;

    font-family: 'JetBrains Mono', monospace;

    font-size: 0.75rem;

    padding: 18px;

    border-radius: 9px;

    min-height: 400px;

    max-height: 500px;

    overflow-y: auto;

    line-height: 1.8;

}



.log-entry {

    display: flex;

    gap: 10px;

    padding: 3px 0;

    border-bottom: 1px dashed rgba(0, 255, 157, 0.08);

    font-size: 0.73rem;

}



.log-time {

    color: rgba(255, 255, 255, 0.3);

    flex-shrink: 0;

}



.dark-card {

    background: linear-gradient(135deg, #0f1117, #1a1f2e);

    border: 1px solid rgba(255, 255, 255, 0.06);

    color: white !important;

    padding: 20px;

    border-radius: var(--radius);

}



.dark-card * {

    color: inherit;

}



.integrity-icon {

    width: 44px;

    height: 44px;

    border-radius: 50%;

    background: rgba(0, 196, 140, 0.15);

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--green);

    font-size: 1.1rem;

    flex-shrink: 0;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   ANALYTICS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.analytics-kpis {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;

    margin-bottom: 20px;

}



.mini-stat {

    transition: all 0.2s ease;

}



.mini-stat:hover {

    transform: translateY(-3px);

    border-color: var(--accent);

}



.order-item-card {

    transition: all 0.2s ease;

}



.order-item-card:hover {

    transform: translateX(4px);

    border-left: 3px solid var(--accent) !important;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   SETTINGS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.settings-page {

    max-width: 560px;

}



.settings-page h2 {

    font-size: 1.4rem;

    font-weight: 800;

    letter-spacing: -0.5px;

    margin-bottom: 20px;

}



.settings-card {

    padding: 8px 0;

}



.setting-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 14px 22px;

    border-bottom: 1px solid var(--border);

}



.setting-row:last-child {

    border-bottom: none;

}



.setting-row label {

    font-size: 0.88rem;

    font-weight: 500;

    color: var(--text);

}



.settings-input {

    width: 180px;

}

.settings-danger-card {

    margin-top: 18px;

    padding: 24px 22px;

    border: 1px solid rgba(244, 71, 71, 0.24);

    background:
        linear-gradient(180deg, rgba(244, 71, 71, 0.06), rgba(244, 71, 71, 0.02)),
        var(--surface);

}

.settings-danger-head {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;

}

.settings-danger-kicker {

    display: inline-block;

    font-size: 0.72rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: var(--danger);

    margin-bottom: 8px;

}

.settings-danger-head h3 {

    margin: 0 0 8px;

    font-size: 1.08rem;

    font-weight: 800;

    color: var(--text);

}

.settings-danger-head p {

    margin: 0;

    font-size: 0.88rem;

    line-height: 1.6;

    color: var(--text2);

    max-width: 520px;

}

.settings-danger-badge {

    flex-shrink: 0;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 36px;

    padding: 0 14px;

    border-radius: 999px;

    border: 1px solid rgba(244, 71, 71, 0.24);

    background: rgba(244, 71, 71, 0.08);

    color: #b42318;

    font-size: 0.76rem;

    font-weight: 700;

}

.account-deletion-panel {

    display: flex;

    flex-direction: column;

    gap: 16px;

}

.account-deletion-summary,
.account-deletion-pending-copy,
.account-deletion-note {

    font-size: 0.88rem;

    line-height: 1.6;

    color: var(--text2);

}

.account-deletion-form .form-group {

    margin-bottom: 14px;

}

.account-deletion-form label {

    display: block;

    margin-bottom: 6px;

    font-size: 0.8rem;

    font-weight: 700;

    color: var(--text);

}

.account-deletion-textarea {

    width: 100%;

    resize: vertical;

    min-height: 110px;

}

.account-deletion-check {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin: 2px 0 4px;

    font-size: 0.83rem;

    line-height: 1.5;

    color: var(--text2);

}

.account-deletion-check input {

    margin-top: 3px;

}

.account-deletion-actions {

    display: flex;

    justify-content: flex-start;

    gap: 12px;

}

.account-deletion-feedback {

    padding: 12px 14px;

    border-radius: 12px;

    font-size: 0.84rem;

    line-height: 1.55;

}

.account-deletion-feedback.is-error {

    background: rgba(244, 71, 71, 0.08);

    border: 1px solid rgba(244, 71, 71, 0.22);

    color: #b42318;

}

.account-deletion-feedback.is-success {

    background: rgba(16, 185, 129, 0.1);

    border: 1px solid rgba(16, 185, 129, 0.24);

    color: #047857;

}

.account-deletion-pending {

    padding: 16px 18px;

    border-radius: 14px;

    background: rgba(191, 33, 33, 0.06);

    border: 1px solid rgba(244, 71, 71, 0.2);

}

.btn-danger {

    background: linear-gradient(135deg, #d92d20, #b42318);

    color: #fff;

    border: 1px solid transparent;

}

.btn-danger:hover {

    background: linear-gradient(135deg, #c51f13, #912018);

}

@media (max-width: 768px) {

    .settings-danger-head {

        flex-direction: column;

    }

    .settings-danger-badge {

        width: fit-content;

    }

    .account-deletion-actions .btn {

        width: 100%;

    }

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   BUTTONS & INPUTS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 8px 18px;

    border-radius: var(--radius);

    font-family: 'Sora', sans-serif;

    font-size: 0.845rem;

    font-weight: 600;

    cursor: pointer;

    transition: var(--transition);

    border: none;

    white-space: nowrap;

}



.btn-primary {

    background: var(--accent);

    color: white;

}



.btn-primary:hover {

    background: var(--accent2);

}



#btn-browse-files {

    background: transparent;

    color: var(--text);

    font-weight: 600;

    letter-spacing: -0.2px;

    border: 1px solid var(--border);

    padding: 12px 32px;

    font-size: 0.95rem;

    border-radius: 30px;

    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

}



#btn-browse-files:hover {

    background: var(--surface2);

    transform: scale(1.02);

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

}



.btn-secondary {

    background: var(--surface);

    border: 1px solid var(--border);

    color: var(--text);

}



.btn-secondary:hover {

    background: var(--surface2);

}



.icon-btn {

    width: 32px;

    height: 32px;

    border-radius: 8px;

    border: 1px solid var(--border);

    background: var(--surface);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    color: var(--text2);

    font-size: 0.8rem;

    transition: var(--transition);

}



.icon-btn:hover {

    background: var(--surface2);

    color: var(--text);

}



.input {

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 8px;

    padding: 9px 13px;

    font-family: 'Sora', sans-serif;

    font-size: 0.845rem;

    color: var(--text);

    outline: none;

    transition: var(--transition);

    width: 100%;

}



.input:focus {

    border-color: var(--accent);

    background: var(--surface);

}



textarea.input {

    resize: vertical;

}



.glass-input {

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 7px;

    padding: 7px 11px;

    font-family: 'Sora', sans-serif;

    color: var(--text);

    outline: none;

    width: 100%;

}



.btn-form-primary {

    background: var(--accent);

    color: white;

    border: none;

    border-radius: 8px;

    padding: 8px 18px;

    font-weight: 600;

    font-family: 'Sora', sans-serif;

    cursor: pointer;

    transition: var(--transition);

}



.btn-form-secondary {

    background: var(--surface2);

    color: var(--text);

    border: 1px solid var(--border);

    border-radius: 8px;

    padding: 8px 18px;

    font-weight: 600;

    font-family: 'Sora', sans-serif;

    cursor: pointer;

    transition: var(--transition);

}



.items-edit-table {

    width: 100%;

    border-collapse: collapse;

}



.items-edit-table th {

    font-size: 0.68rem;

    color: var(--text3);

    padding-bottom: 6px;

    text-align: left;

}



.items-edit-table td {

    padding: 3px;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   MODALS

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.modal-overlay {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.45);

    backdrop-filter: blur(6px);

    display: flex;

    align-items: center;

    justify-content: center;

    z-index: 1000;

    padding: 20px;

    animation: overlayIn 0.2s ease;

}



@keyframes overlayIn {

    from {

        opacity: 0;

    }



    to {

        opacity: 1;

    }

}



.modal-content {

    width: 90%;

    max-width: 460px;

    position: relative;

    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);

}



.modal-close-float {

    position: absolute;

    top: -12px;

    right: -12px;

    width: 32px;

    height: 32px;

    border-radius: 50%;

    background: var(--surface);

    border: 1px solid var(--border);

    color: var(--text2);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);

    z-index: 10000;

    padding: 0;

}



.modal-close-float:hover {

    background: var(--surface2);

    color: var(--text);

    transform: scale(1.1);

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);

}



@keyframes modalIn {

    from {

        opacity: 0;

        transform: scale(0.94) translateY(10px);

    }



    to {

        opacity: 1;

        transform: scale(1) translateY(0);

    }

}



.modal-overlay.closing {

    animation: overlayIn 0.3s ease reverse forwards;

    pointer-events: none;

}



.modal-overlay.closing .modal-content {

    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) reverse forwards;

}



body.modal-open .container {

    filter: blur(3px);

}



#view-parcels {

    transition: opacity 0.3s ease, pointer-events 0.3s ease;

}



.table-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 24px;

}



.modal-header-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;

}



.modal-header-row h2 {

    font-size: 1.1rem;

    font-weight: 700;

}



.modal-body-pad {

    margin-bottom: 20px;

}



.modal-footer-row {

    display: flex;

    gap: 10px;

    justify-content: flex-end;

}



.modal-avatar-wrap {

    text-align: center;

    margin-bottom: 24px;

}



.modal-avatar {

    width: 72px;

    height: 72px;

    border-radius: 50%;

    background: var(--accent-soft);

    color: var(--accent);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.8rem;

    font-weight: 700;

    margin: 0 auto 12px;

    border: 2px solid rgba(0, 102, 255, 0.2);

}



.modal-fields {

    display: flex;

    flex-direction: column;

    gap: 14px;

    margin-bottom: 20px;

}



.modal-btns {

    display: flex;

    flex-direction: column;

    gap: 8px;

}



.close-modal-btn {

    position: absolute;

    top: 16px;

    right: 16px;

    width: 28px;

    height: 28px;

    border-radius: 50%;

    border: 1px solid var(--border);

    background: var(--surface2);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    color: var(--text2);

    font-size: 0.8rem;

    transition: var(--transition);

}



.close-modal-btn:hover {

    background: var(--red-soft);

    color: var(--red);

}



.modal-sub-nav {

    display: flex;

    gap: 4px;

    background: var(--surface2);

    padding: 3px;

    border-radius: 9px;

    border: 1px solid var(--border);

    margin-bottom: 16px;

}



.modal-tab {

    flex: 1;

    padding: 7px;

    border-radius: 7px;

    border: none;

    background: transparent;

    font-size: 0.8rem;

    font-weight: 600;

    color: var(--text3);

    cursor: pointer;

    transition: var(--transition);

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

}



.modal-tab.active {

    background: var(--surface);

    color: var(--text);

    box-shadow: var(--shadow-sm);

}



.account-fields {

    display: flex;

    flex-direction: column;

    gap: 12px;

}



.field-item {

    display: flex;

    flex-direction: column;

    gap: 4px;

}



.field-item label {

    font-size: 0.72rem;

    text-transform: uppercase;

    letter-spacing: 0.8px;

    color: var(--text3);

    font-weight: 600;

}



.field-value {

    padding: 8px 12px;

    font-family: 'JetBrains Mono', monospace;

    font-size: 0.82rem;

    background: var(--surface2);

    border: 1px solid var(--border);

    border-radius: 7px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    display: block;

}



/* BLOCKCHAIN TIMELINE STYLES */

.history-timeline {

    position: relative;

    padding-left: 30px;

    margin-top: 10px;

    border-left: 2px solid var(--border);

    max-height: 50vh;

    overflow-y: auto;

}



.history-timeline::before {

    content: '';

    position: absolute;

    left: -5px;

    top: 0;

    width: 10px;

    height: 10px;

    background: var(--purple);

    border-radius: 50%;

}



.history-item {

    position: relative;

    margin-bottom: 25px;

    padding: 15px;

    background: var(--surface2);

    border-radius: var(--radius-md);

    border: 1px solid var(--border);

    transition: transform 0.2s, box-shadow 0.2s;

}



.history-item:hover {

    transform: translateY(-2px);

    box-shadow: var(--shadow-md);

    border-color: var(--purple);

}



.history-item::before {

    content: '';

    position: absolute;

    left: -37px;

    top: 20px;

    width: 12px;

    height: 12px;

    background: var(--purple);

    border: 3px solid var(--surface);

    border-radius: 50%;

}



.history-date {

    font-size: 0.75rem;

    color: var(--text3);

    margin-bottom: 5px;

    font-weight: 600;

}



.history-status {

    font-size: 1rem;

    font-weight: 700;

    color: var(--text);

    margin-bottom: 8px;

}



.history-reason {

    font-size: 0.9rem;

    color: var(--text2);

    margin-bottom: 12px;

    line-height: 1.4;

    font-style: italic;

}



.history-meta {

    display: flex;

    gap: 15px;

    font-size: 0.8rem;

    color: var(--text3);

    border-top: 1px solid var(--border);

    padding-top: 8px;

}



.history-meta span {

    display: flex;

    align-items: center;

    gap: 5px;

}



.history-meta i {

    color: var(--purple);

}



/* Global/Dashboard Timeline Specifics */

.history-dot {

    position: absolute;

    left: -37px;

    top: 20px;

    width: 12px;

    height: 12px;

    border-radius: 50%;

    border: 3px solid var(--surface);

    z-index: 2;

}



.history-time {

    font-size: 0.75rem;

    color: var(--accent);

    font-weight: 700;

    text-transform: uppercase;

}



.history-msg {

    font-size: 0.9rem;

    font-weight: 500;

    line-height: 1.4;

}



.loading, .empty {

    text-align: center;

    padding: 40px;

    color: var(--text3);

    font-style: italic;

}

.photos-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;

}



.photo-item {

    border-radius: 9px;

    overflow: hidden;

    cursor: pointer;

    border: 1px solid var(--border);

}



.photo-item img {

    width: 100%;

    height: 150px;

    object-fit: cover;

}



.photo-date {

    padding: 6px 10px;

    font-size: 0.72rem;

    color: var(--text3);

}



.camera-preview-wrap {

    position: relative;

    background: #000;

    border-radius: 12px;

    overflow: hidden;

    height: 360px;

}



#camera-preview {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.camera-status {

    position: absolute;

    bottom: 10px;

    left: 0;

    right: 0;

    text-align: center;

    font-size: 0.78rem;

    color: white;

    background: rgba(0, 0, 0, 0.5);

    padding: 5px;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   EMPTY STATE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.empty-state {

    text-align: center;

    padding: 60px 40px;

}



.empty-icon {

    font-size: 3rem;

    opacity: 0.3;

    display: block;

    margin-bottom: 16px;

}



.empty-state h2 {

    font-size: 1.2rem;

    font-weight: 700;

    margin-bottom: 8px;

}



.empty-state p {

    color: var(--text3);

    font-size: 0.88rem;

}



/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   RESPONSIVE

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1400px) {

    .kpi-grid {

        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    }



    .quick-actions {

        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    }

}



@media (max-width: 1200px) {

    .kpi-grid {

        grid-template-columns: repeat(2, 1fr);

    }



    .quick-actions {

        grid-template-columns: repeat(2, 1fr);

    }



    .dash-bottom {

        grid-template-columns: 1fr;

    }



    .so-layout {

        grid-template-columns: 1fr;

    }



    .security-layout {

        grid-template-columns: 1fr;

    }



    .charts-row {

        grid-template-columns: 1fr;

    }

}



@media (max-width: 768px) {
}

/* IA Sécurité & Integration Styles */
.ai-dark-card {
 background: var(--bg-secondary);
 border: 1px solid var(--bg-border);
 padding: 24px;
 border-radius: var(--radius);
 color: var(--text-primary);
}

.ai-stats-simple {
 margin-top: 20px;
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.ai-stat-row {
 display: flex;
 justify-content: space-between;
 align-items: center;
 font-size: 0.95rem;
}

.ai-stat-label {
 color: var(--text-secondary);
}

.ai-stat-val {
 color: var(--accent-primary);
 font-weight: 700;
}

.security-console {
 background: var(--bg-tertiary);
 border: 1px solid var(--bg-border);
 padding: 15px;
 border-radius: var(--radius);
 font-family: 'JetBrains Mono', monospace;
 font-size: 0.85rem;
 max-height: 400px;
 overflow-y: auto;
}

.log-entry {
 padding: 8px;
 border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.log-entry:nth-child(even) {
 background: rgba(255, 255, 255, 0.02);
}

.dark-card {
 background: var(--bg-secondary) !important;
 border: 1px solid var(--bg-border) !important;
 color: var(--text-primary) !important;
}

.integrity-icon {
 color: var(--success);
 font-size: 1.5rem;
}


/* Action Buttons Styles */
.action-btn {
  display: flex;
  flex-direction: row;     /* icône + texte sur même ligne */
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--bg-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;     /* empêche le texte de passer à la ligne */
  overflow: hidden;
}

.action-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.action-btn i {
  font-size: 20px;
  color: var(--accent-primary);
  min-width: 24px;         /* largeur fixe pour l'icône */
  flex-shrink: 0;          /* icône ne rétrécit jamais */
}

.action-btn span {
  flex: 1;
  text-align: left;
}


/* Premium Sub-navigation Tabs */
.sub-nav-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-border);
  width: fit-content;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sub-nav-tab {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.sub-nav-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================================================================
   VIEW: SUBSCRIPTION (PRICING)
   ================================================================== */

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

.pricing-header-top {
    text-align: center;
    margin-bottom: 50px;
}

.pricing-header-top h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
    color: var(--text);
}

.pricing-header-top p {
    color: var(--text3);
    font-size: 1.1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-soft);
}

.pricing-card.popular {
    border: 2px solid var(--accent);
    background: linear-gradient(180deg, var(--surface) 0%, rgba(0, 120, 212, 0.03) 100%);
}

.popular-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-icon-box {
    width: 64px;
    height: 64px;
    border: 3.5px solid var(--accent);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.pricing-card:hover .pricing-icon-box {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.pricing-card .plan-desc {
    font-size: 0.9rem;
    color: var(--text3);
    margin-bottom: 24px;
    min-height: 40px;
}

.pricing-price {
    margin-bottom: 30px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pricing-price .amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
}

.pricing-price .currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text2);
}

.pricing-price .period {
    font-size: 0.95rem;
    color: var(--text3);
    margin-left: 4px;
}

.pricing-features {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text2);
    margin-bottom: 14px;
    line-height: 1.4;
}

.pricing-features li i {
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 4px;
}

.pricing-features li.disabled {
    opacity: 0.4;
    text-decoration: line-through;
}

.btn-pricing {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-pricing-primary {
    background: var(--accent);
    color: white;
}

.btn-pricing-primary:hover {
    background: var(--accent2);
    box-shadow: 0 8px 20px var(--accent-soft);
}

.btn-pricing-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-pricing-secondary:hover {
    background: var(--border);
    border-color: var(--text3);
}

.pricing-card.current-plan {
    border-color: var(--green);
}

.current-plan-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-header-top h1 {
        font-size: 2rem;
    }
}

/* Operational Flow (professional simplified layout) */
.ops-flow-pro {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ops-flow-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ops-kpi {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.ops-kpi-label {
    color: var(--text3);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.ops-kpi-value {
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ops-kpi-sub {
    color: var(--text2);
    font-size: 0.78rem;
    margin-top: 4px;
}

.ops-pipeline {
    display: flex;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.ops-stage {
    flex: 1 1 0;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

.ops-stage-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.ops-stage-title {
    color: var(--text2);
    font-size: 0.82rem;
    font-weight: 600;
}

.ops-stage-count {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
}

.ops-stage-progress {
    width: 100%;
    height: 8px;
    background: var(--surface2);
    border-radius: 999px;
    overflow: hidden;
}

.ops-stage-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.25s ease-out;
}

.ops-stage-meta {
    margin-top: 8px;
    color: var(--text3);
    font-size: 0.76rem;
}

.ops-connector {
    flex: 0 0 auto;
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: 0.85rem;
    user-select: none;
}

.ops-flow-detail {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.ops-detail-title {
    color: var(--text2);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.ops-detail-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ops-chip {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ops-chip-label {
    color: var(--text3);
    font-size: 0.78rem;
}

.ops-chip-value {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.ops-tone-neutral { border-color: var(--border); }
.ops-tone-info { border-color: rgba(59, 130, 246, 0.35); }
.ops-tone-success { border-color: rgba(16, 185, 129, 0.35); }
.ops-tone-warning { border-color: rgba(245, 158, 11, 0.38); }
.ops-tone-danger { border-color: rgba(239, 68, 68, 0.35); }

.ops-stage.ops-tone-info .ops-stage-progress-fill { background: #3b82f6; }
.ops-stage.ops-tone-success .ops-stage-progress-fill { background: #10b981; }
.ops-stage.ops-tone-warning .ops-stage-progress-fill { background: #f59e0b; }
.ops-stage.ops-tone-danger .ops-stage-progress-fill { background: #ef4444; }

@media (max-width: 980px) {
    .ops-flow-summary {
        grid-template-columns: 1fr;
    }
    .ops-detail-chips {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ops-stage {
        min-width: 140px;
    }
    .ops-connector {
        width: 14px;
    }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE RESPONSIVE — Burger Menu & Layout (≤768px)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Burger button — hidden on desktop */
.burger-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.burger-menu-btn i {
    pointer-events: none;
}
.burger-menu-btn:hover {
    background: var(--surface2);
}

/* Sidebar backdrop — hidden on desktop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

@media (max-width: 768px) {

    :root {
        --safe-area-top: env(safe-area-inset-top, 0px);
        --safe-area-right: env(safe-area-inset-right, 0px);
        --safe-area-bottom: env(safe-area-inset-bottom, 0px);
        --safe-area-left: env(safe-area-inset-left, 0px);
    }

    /* Show burger */
    .burger-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text);
        border-radius: 10px;
        font-size: 1rem;
    }

    /* Sidebar: hidden off-screen by default */
    .sidebar {
        width: min(82vw, 320px);
        padding-top: var(--safe-area-top);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
        box-shadow: none;
    }

    /* Sidebar open state */
    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
    }

    /* Show backdrop when open */
    body.sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    /* Main content: full width */
    .main-content {
        margin-left: 0 !important;
        min-height: 100dvh;
    }

    /* Header adjustments */
    .header {
        height: auto;
        min-height: calc(var(--header-h) + var(--safe-area-top));
        padding: calc(12px + var(--safe-area-top)) calc(14px + var(--safe-area-right)) 12px calc(14px + var(--safe-area-left)) !important;
        gap: 8px;
    }

    .header-left {
        flex: 1;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .header-title-group {
        min-width: 0;
    }

    .header-greeting {
        display: block;
        font-size: 0.68rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-title {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-right {
        flex-shrink: 0;
    }

    /* Search bar: hide on mobile header */
    .header-search-container {
        display: none;
    }

    .search-shortcut {
        display: none !important;
    }

    /* Status pill compact */
    .status-pill span {
        display: none;
    }
    .status-pill {
        padding: 4px 8px !important;
        min-width: 0 !important;
    }

    /* Content padding reduced */
    .content {
        padding: 14px calc(14px + var(--safe-area-right)) calc(18px + var(--safe-area-bottom)) calc(14px + var(--safe-area-left)) !important;
    }

    /* KPI Grid: 2 columns on mobile */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .kpi-card {
        padding: 14px !important;
    }

    .kpi-value {
        font-size: 1.4rem !important;
    }

    .kpi-label {
        font-size: 0.7rem !important;
    }

    .kpi-trend {
        font-size: 0.65rem !important;
    }

    .kpi-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.7rem !important;
    }

    /* Quick actions: 2 columns */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .quick-btn {
        padding: 14px 10px !important;
    }

    .quick-btn span {
        font-size: 0.72rem !important;
    }

    /* Charts: single column */
    .charts-row {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard bottom: single column */
    .dash-bottom {
        grid-template-columns: 1fr !important;
    }

    /* Tables: horizontal scroll */
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    /* Search bar full width */
    .search-bar-wrap {
        width: 100% !important;
    }

    /* Filter pills wrap */
    .filter-pills {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .filter-pill {
        font-size: 0.72rem !important;
        padding: 5px 10px !important;
    }

    /* Forms: single column */
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-page-header {
        flex-direction: column;
        gap: 12px;
    }

    .form-page-header h1 {
        font-size: 1.3rem !important;
    }

    /* Cards padding reduced */
    .card {
        padding: 16px !important;
    }

    .card-header {
        flex-direction: column;
        gap: 8px;
    }

    /* Supplier Orders layout */
    .so-header {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .so-stats {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .so-layout {
        grid-template-columns: 1fr !important;
    }

    /* Security layout */
    .security-layout {
        grid-template-columns: 1fr !important;
    }

    /* Sub-nav tabs: scrollable */
    .sub-nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        gap: 4px !important;
    }

    .sub-nav-tab {
        font-size: 0.75rem !important;
        padding: 8px 12px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Secondary nav compact */
    .nav-actions {
        flex-wrap: wrap;
        gap: 6px !important;
    }

    /* AI widget */
    .ai-dark-card {
        padding: 16px !important;
    }

    /* Pricing grid */
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }

    /* Ops flow */
    .ops-flow-summary {
        grid-template-columns: 1fr !important;
    }

    /* Section Headers */
    .so-header h2 {
        font-size: 1.2rem !important;
    }

    /* Modal responsiveness */
    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 10px !important;
        padding: 16px !important;
    }

    /* Settings grid */
    .settings-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .quick-actions {
        grid-template-columns: 1fr !important;
    }

    .header-title {
        font-size: 0.95rem !important;
    }

    .header-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   LOCAL PASSWORD BANNER & MODAL

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes lpb-slide-in {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.local-password-banner {
    margin-bottom: 20px;
    animation: lpb-slide-in 0.4s ease forwards;
}

.lpb-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.12), rgba(86, 156, 214, 0.08));
    border: 1px solid rgba(0, 120, 212, 0.25);
    backdrop-filter: blur(8px);
}

.lpb-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-primary), #569cd6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.lpb-text {
    flex: 1;
    min-width: 0;
}

.lpb-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.lpb-text p {
    font-size: 0.78rem;
    color: var(--text2);
    margin: 0;
    line-height: 1.4;
}

.lpb-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.lpb-actions .btn {
    font-size: 0.78rem;
    padding: 8px 16px;
    white-space: nowrap;
}

/* --- Password Modal Overlay --- */

.modal-overlay-pw {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lpb-slide-in 0.25s ease forwards;
}

body.local-password-required {
    overflow: hidden;
}

.modal-card-pw {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 420px;
    max-width: 92vw;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-pw-header {
    padding: 28px 28px 0;
    text-align: center;
}

.modal-pw-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-primary), #569cd6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 14px;
}

.modal-pw-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.modal-pw-sub {
    font-size: 0.78rem;
    color: var(--text3);
    line-height: 1.5;
}

.modal-pw-body {
    padding: 22px 28px 8px;
}

.modal-pw-body .form-group {
    margin-bottom: 14px;
}

.modal-pw-body label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.modal-pw-body .input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.88rem;
    font-family: 'Sora', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.modal-pw-body .input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.pw-msg {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-top: 6px;
    line-height: 1.4;
}

.pw-msg-error {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid rgba(244, 71, 71, 0.2);
}

.pw-msg-success {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(78, 201, 176, 0.2);
}

.modal-pw-actions {
    padding: 12px 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-pw-actions .btn {
    font-size: 0.82rem;
    padding: 10px 22px;
}

.modal-pw-actions .btn-primary {
    min-width: 180px;
}

@media (max-width: 600px) {
    .lpb-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .lpb-actions {
        width: 100%;
        justify-content: center;
    }
    .modal-card-pw {
        width: 95vw;
    }
    .modal-pw-actions {
        padding-top: 4px;
    }
    .modal-pw-actions .btn-primary {
        width: 100%;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   PRIVACY CENTER

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.settings-policy-card {
    margin-top: 18px;
    padding: 24px 22px;
    border: 1px solid rgba(86, 156, 214, 0.22);
    background:
        linear-gradient(180deg, rgba(86, 156, 214, 0.08), rgba(86, 156, 214, 0.03)),
        var(--surface);
}

.settings-policy-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.settings-policy-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--info);
    margin-bottom: 8px;
}

.settings-policy-head h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text);
}

.settings-policy-head p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text2);
    max-width: 520px;
}

.settings-policy-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(86, 156, 214, 0.22);
    background: rgba(86, 156, 214, 0.12);
    color: #8ecaf8;
    font-size: 0.76rem;
    font-weight: 700;
}

.settings-policy-card[data-policy-state="required"] .settings-policy-badge {
    border-color: rgba(220, 220, 170, 0.24);
    background: rgba(220, 220, 170, 0.12);
    color: #ece8a8;
}

.settings-policy-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-policy-summary {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text2);
}

.settings-policy-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

body.privacy-policy-required {
    overflow: hidden;
}

.privacy-policy-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 12, 16, 0.78);
    backdrop-filter: blur(8px);
    z-index: 1300;
}

.privacy-policy-modal {
    width: min(760px, 100%);
    max-height: min(86vh, 920px);
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(86, 156, 214, 0.18);
    background:
        linear-gradient(180deg, rgba(86, 156, 214, 0.06), rgba(37, 37, 38, 0.98) 26%),
        var(--surface);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.privacy-policy-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy-policy-header-copy h2 {
    margin: 0;
    font-size: 1.34rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.privacy-policy-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--info);
}

.privacy-policy-subtitle {
    margin: 10px 0 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text2);
    max-width: 560px;
}

.privacy-policy-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.privacy-policy-close:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.privacy-policy-body {
    padding: 22px 26px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.privacy-policy-highlight {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(86, 156, 214, 0.18);
    background: rgba(86, 156, 214, 0.08);
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.65;
}

.privacy-policy-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.privacy-policy-section h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

.privacy-policy-section p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.68;
    color: var(--text2);
}

.privacy-policy-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
    color: var(--text2);
    font-size: 0.86rem;
    line-height: 1.68;
}

.privacy-policy-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 26px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.08);
}

.privacy-policy-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--text2);
}

.privacy-policy-check input {
    margin-top: 3px;
}

.privacy-policy-feedback {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.55;
}

.privacy-policy-feedback.is-error,
.privacy-policy-feedback.is-success {
    display: block;
}

.privacy-policy-feedback.is-error {
    background: rgba(244, 71, 71, 0.08);
    border: 1px solid rgba(244, 71, 71, 0.22);
    color: #f38f8f;
}

.privacy-policy-feedback.is-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.24);
    color: #7ce7c0;
}

.privacy-policy-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .settings-policy-head {
        flex-direction: column;
    }

    .settings-policy-badge {
        width: fit-content;
    }

    .privacy-policy-overlay {
        padding: 16px;
    }

    .privacy-policy-modal {
        max-height: calc(100vh - 32px);
        border-radius: 18px;
    }

    .privacy-policy-header,
    .privacy-policy-body,
    .privacy-policy-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .privacy-policy-header {
        flex-direction: column;
    }

    .privacy-policy-close {
        align-self: flex-end;
    }

    .privacy-policy-actions .btn,
    .settings-policy-actions .btn {
        width: 100%;
    }
}
