/* Factory - Interface Admin Moderne Arobiz */

:root {
    /* Couleurs Arobiz */
    --color-primary: #f6d210;
    --color-primary-hover: #e5c30f;
    --color-primary-soft: rgba(246, 210, 16, 0.10);
    --color-dark: #020202;
    --color-white: #ffffff;

    /* Couleurs dérivées - Theme Sombre (defaut) */
    --color-bg: #0a0a0a;
    --color-bg-rgb: 10, 10, 10;
    --color-surface: #141414;
    --color-surface-hover: #1a1a1a;
    --color-surface-elevated: #1e1e1e;
    --color-border: #1e1e1e;
    --color-border-light: #252525;

    /* Texte */
    --color-text: #f5f5f5;
    --color-text-muted: #888888;
    --color-text-subtle: #666666;

    /* États */
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    /* Layout */
    --sidebar-width: 215px;
    --sidebar-collapsed: 70px;
    --topbar-height: 60px;

    /* Effets */
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-pill: 100px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 20px rgba(246, 210, 16, 0.15);
    --transition: all 0.2s ease;
}

/* Theme Clair */
[data-theme="light"] {
    --color-bg: #f8f8f8;
    --color-bg-rgb: 245, 245, 245;
    --color-surface: #ffffff;
    --color-surface-hover: #f0f0f0;
    --color-surface-elevated: #fafafa;
    --color-border: #ebebeb;
    --color-border-light: #e0e0e0;

    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-text-subtle: #999999;

    --color-primary-soft: rgba(246, 210, 16, 0.12);

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(246, 210, 16, 0.25);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-surface);
    min-height: 100vh;
    cursor: url('/assets/cursors/dark/arrow.cur'), default;
}

/* ================================
   LAYOUT GRID PRINCIPAL
   ================================ */

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--topbar-height) 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar main";
    height: 100vh;
    overflow: hidden;
    background: var(--color-surface);
}

.main-wrapper {
    grid-area: main;
    padding: 0 15px 15px 0px;
    overflow: hidden;
}

.main-wrapper-inner {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    height: 100%;
    overflow-y: auto;
}

/* ================================
   SIDEBAR
   ================================ */

.sidebar {
    grid-area: sidebar;
    background: var(--color-surface);
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
    border-bottom: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    justify-content: start;
}

.sidebar-logo {
    width: 100%;
    padding: 15px;
    max-width: 200px;
}

.sidebar-logo-mini {
    display: none;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.app-layout.sidebar-collapsed .sidebar-logo-mini {
    display: block;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-subtle);
    text-transform: capitalize;
    padding: 0 10px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: var(--radius-lg);
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.nav-link.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: none;
}

/* Sidebar Collapsed State */
.app-layout.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed) 1fr;
}

.app-layout.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
    align-items: center;
}

.app-layout.sidebar-collapsed .nav-section-title,
.app-layout.sidebar-collapsed .nav-text,
.app-layout.sidebar-collapsed .sidebar-footer-text,
.app-layout.sidebar-collapsed .sidebar-logo {
    display: none;
}

.app-layout.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 10px;
}

.app-layout.sidebar-collapsed .nav-link .nav-icon {
    margin: 0;
}

.app-layout.sidebar-collapsed .sidebar-nav {
    padding: 10px;
}

.app-layout.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

.app-layout.sidebar-collapsed .sidebar-header {
    padding: 10px;
}

.app-layout.sidebar-collapsed .sidebar-footer {
    padding: 10px;
}

/* Sidebar Toggle Button */
.sidebar-collapse-btn {
    position: absolute;
    top: 20px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--color-surface);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    color: var(--color-text-muted);
    transition: var(--transition);
    z-index: 101;
}

.sidebar-collapse-btn:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

.sidebar-collapse-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.app-layout.sidebar-collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}

.sidebar-footer-text {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    text-align: center;
}

/* ================================
   TOPBAR
   ================================ */

.topbar {
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    height: var(--topbar-height);
    z-index: 90;
    background: var(--color-surface);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    width: 420px;
    padding: 8px 15px 8px 40px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 0.875rem;
}

.topbar-search input::placeholder {
    color: var(--color-text-subtle);
}

.topbar-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-soft);
    background: var(--color-surface);
}

.topbar-search > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-text-subtle);
    z-index: 2;
}

/* Shortcut badge */
.search-shortcut {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-family: inherit;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-subtle);
    pointer-events: none;
    opacity: 0.7;
    line-height: 1.3;
}

.topbar-search.search-active .search-shortcut {
    display: none;
}

/* Expanded state */
.topbar-search.search-active input {
    background: var(--color-surface);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* Results overlay */
.search-results-overlay {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-height: 540px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    z-index: 1000;
}

.topbar-search.search-active .search-results-overlay {
    display: block;
}

/* Empty / loading / no results states */
.search-results-empty,
.search-results-loading,
.search-results-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 20px;
    color: var(--color-text-subtle);
    font-size: 0.85rem;
    text-align: center;
}

.search-results-empty svg,
.search-results-none svg {
    opacity: 0.3;
}

/* Spinner */
.search-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: search-spin 0.6s linear infinite;
}

@keyframes search-spin {
    to { transform: rotate(360deg); }
}

/* Section blocks */
.search-section {
    border-bottom: 1px solid var(--color-border);
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-subtle);
}

.search-section-header svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.search-section-count {
    margin-left: auto;
    background: var(--color-bg);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Result items */
.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.12s;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
}

.search-result-item:hover,
.search-result-item.focused {
    background: var(--color-bg);
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.search-result-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-title mark {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-radius: 2px;
    padding: 0 1px;
}

.search-result-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle mark {
    background: transparent;
    color: var(--color-primary);
}

.search-result-status {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--status-color) 15%, transparent);
    color: var(--status-color);
}

/* Scrollbar */
.search-results-overlay::-webkit-scrollbar {
    width: 4px;
}

.search-results-overlay::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-overlay::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), #e5c30f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-dark);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.topbar-avatar:hover {
    box-shadow: var(--shadow-glow);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg);
    border: none;
    border-radius: 50px;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
    color: var(--color-text-muted);
}

.theme-toggle:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

/* Dark theme: show sun icon (to switch to light) */
:root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
}

/* Light theme: show moon icon (to switch to dark) */
[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* ================================
   MAIN CONTENT
   ================================ */

.main-content {
    padding: 20px;
}

.content-wrapper {
    width: 100%;
}

/* ================================
   TYPOGRAPHY
   ================================ */

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

p {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.lead {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

/* ================================
   CARDS
   ================================ */

.card {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-bg);
}

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

.card-desc {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 24px;
}

/* Feature Cards Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.feature-card {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
}

.feature-card h3 {
    color: var(--color-primary);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* ================================
   BOUTONS
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
    line-height: 1.4;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-dark);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-surface-hover);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-pill);
}

.btn-outline:hover {
    background: rgba(246, 210, 16, 0.1);
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 5px 15px;
    font-size: 0.8rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1rem;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: url('/assets/cursors/dark/no.cur'), not-allowed;
}

/* ================================
   FORMULAIRES - Style IA moderne
   ================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-subtle);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    background: var(--color-surface);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-soft);
    background: var(--color-surface);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--color-text-subtle);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--color-bg);
}

/* Input File Custom */
.form-group input[type="file"] {
    padding: 0;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-lg);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
}

.form-group input[type="file"]::file-selector-button {
    padding: 10px 20px;
    margin-right: 15px;
    background: var(--color-surface-elevated);
    border: none;
    color: var(--color-text);
    font-weight: 500;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.form-group input[type="file"]:hover::file-selector-button {
    background: var(--color-primary);
    color: var(--color-dark);
}

/* ================================
   ALERTS
   ================================ */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: none;
    color: var(--color-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: var(--color-danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: none;
    color: var(--color-info);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: none;
    color: var(--color-warning);
}

/* ================================
   TABLES
   ================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-bg);
}

.table th {
    background: var(--color-surface-elevated);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--color-surface-hover);
}

.table .actions {
    white-space: nowrap;
    display: flex;
    gap: 8px;
}

.table .actions form {
    display: inline;
}

/* ================================
   STEPS GUIDE
   ================================ */

.steps-guide {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.step:hover {
    background: var(--color-surface-hover);
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: var(--color-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.step-content h3 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.step-content p {
    margin: 0;
    font-size: 0.85rem;
}

/* ================================
   PAGES SPÉCIFIQUES
   ================================ */

/* Page d'erreur */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 3rem;
    color: var(--color-primary);
    text-shadow: var(--shadow-glow);
    margin-bottom: 16px;
}

/* Preview page */
.parsed-info {
    background: var(--color-bg);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.sections-preview {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 20px;
}

.section {
    margin-bottom: 16px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-heading {
    color: var(--color-primary);
}

.section-list {
    margin-left: 20px;
    color: var(--color-text-muted);
}

.note {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--color-surface);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ================================
   SCROLLBAR CUSTOM
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-subtle);
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.card,
.feature-card {
    animation: fadeIn 0.3s ease;
}

/* ================================
   RESPONSIVE
   ================================ */

/* Menu mobile fullscreen - caché par défaut */
.mobile-menu {
    display: none;
}

/* Bouton menu burger - caché par défaut */
.sidebar-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: var(--sidebar-collapsed) 1fr;
    }

    .sidebar {
        width: var(--sidebar-collapsed) !important;
        align-items: center;
    }

    .nav-text,
    .nav-section-title,
    .sidebar-footer-text,
    .sidebar-logo {
        display: none !important;
    }

    .sidebar-logo-mini {
        display: block !important;
    }

    .nav-link {
        justify-content: center;
        padding: 10px;
    }

    .sidebar-nav {
        padding: 10px;
    }

    .sidebar-header {
        padding: 10px;
    }

    .sidebar-collapse-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    /* Layout mobile */
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: var(--topbar-height) 1fr;
        grid-template-areas:
            "topbar"
            "main";
        background: var(--color-bg);
        height: auto;
        overflow: visible;
    }

    .main-wrapper {
        padding: 0;
    }

    .main-wrapper-inner {
        border-radius: 0;
        box-shadow: none;
        height: auto;
        position: static;
        overflow: visible;
    }

    /* Sidebar complètement cachée sur mobile */
    .sidebar {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
    }

    /* Bouton burger visible */
    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        background: transparent;
        border: none;
        cursor: url('/assets/cursors/dark/hand.cur'), pointer;
        color: var(--color-text);
        -webkit-tap-highlight-color: transparent;
    }

    .sidebar-toggle:active {
        opacity: 0.7;
    }

    .sidebar-toggle svg {
        width: 24px;
        height: 24px;
        pointer-events: none;
    }

    /* Menu mobile fullscreen */
    .mobile-menu {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: var(--color-bg);
        z-index: 99999 !important;
        flex-direction: column;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .mobile-menu.open {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        flex-shrink: 0;
    }

    .mobile-menu-logo img {
        height: 28px;
        width: auto;
    }

    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        background: transparent;
        border: none;
        cursor: url('/assets/cursors/dark/hand.cur'), pointer;
        color: var(--color-text);
    }

    .mobile-menu-close svg {
        width: 24px;
        height: 24px;
    }

    .mobile-menu-nav {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mobile-menu-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--color-text);
        text-decoration: none;
        background: var(--color-surface);
        border: none;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .mobile-menu-link.active {
        background: var(--color-primary);
        color: #000;
    }

    .mobile-menu-link.active svg {
        color: #000;
    }

    .mobile-menu-link svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        color: var(--color-text-muted);
    }

    .mobile-menu-divider {
        height: 1px;
        background: var(--color-border);
        margin: 6px 0;
    }

    .mobile-menu-footer {
        padding: 15px;
        flex-shrink: 0;
    }

    .mobile-menu-theme {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 12px 16px;
        font-size: 0.9rem;
        color: var(--color-text);
        background: var(--color-surface);
        border: none;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        cursor: url('/assets/cursors/dark/hand.cur'), pointer;
        margin-bottom: 10px;
    }

    .mobile-menu-theme svg {
        width: 18px;
        height: 18px;
    }

    .mobile-menu-theme .icon-moon {
        display: none;
    }

    [data-theme="light"] .mobile-menu-theme .icon-sun {
        display: none;
    }

    [data-theme="light"] .mobile-menu-theme .icon-moon {
        display: block;
    }

    .mobile-menu-copyright {
        font-size: 0.75rem;
        color: var(--color-text-muted);
        text-align: center;
    }

    /* Topbar mobile */
    .topbar {
        margin-left: 0;
        padding: 0 15px;
        height: var(--topbar-height);
    }

    .topbar-left {
        gap: 12px;
    }

    .topbar-right {
        gap: 8px;
    }

    .topbar-search {
        display: none;
    }

    .topbar-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

    .page-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
        margin-bottom: 0;
    }

    /* Main content mobile */
    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    /* Cards et conteneurs */
    .card {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: var(--radius-md);
    }

    .card-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-title {
        font-size: 1rem;
    }

    .feature-card {
        padding: 15px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Formulaires */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-actions {
        padding-top: 15px;
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Boutons */
    .btn {
        font-size: 0.875rem;
    }

    .btn-large {
        padding: 12px 20px;
        width: 100%;
    }

    /* Tables */
    .table-wrapper {
        border-radius: var(--radius-md);
        margin: 0 -15px;
        width: calc(100% + 30px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    /* Admin components */
    .admin-card {
        margin-bottom: 15px;
        border-radius: var(--radius-md);
    }

    .admin-card-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-card-header h2 {
        font-size: 0.95rem;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }

    .admin-stat-card {
        padding: 12px;
    }

    .admin-stat-value {
        font-size: 1.25rem;
    }

    .admin-stat-label {
        font-size: 0.7rem;
    }

    .admin-stat-icon {
        width: 36px;
        height: 36px;
    }

    .admin-stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .admin-table-wrapper {
        margin: 0 -15px;
        width: calc(100% + 30px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .admin-filters {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
    }

    .admin-filter-group {
        width: 100%;
    }

    .admin-search-input {
        width: 100%;
    }

    .admin-filter-select {
        flex: 1;
    }

    .admin-pagination {
        padding: 12px 15px;
    }

    .admin-quick-actions {
        flex-direction: column;
    }

    .admin-action-btn {
        width: 100%;
        justify-content: center;
    }

    /* Alerts */
    .alert {
        padding: 12px 15px;
        margin-bottom: 15px;
        font-size: 0.85rem;
    }

    /* Steps */
    .steps-guide {
        gap: 12px;
    }

    .step {
        padding: 12px;
        gap: 12px;
    }

    /* Sections preview */
    .sections-preview {
        padding: 15px;
    }

    .parsed-info {
        padding: 12px 15px;
        margin-bottom: 15px;
    }

    /* Typography */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .lead {
        font-size: 0.875rem;
        margin-bottom: 15px;
    }

    /* Modals */
    .modal {
        padding: 15px;
    }

    .modal-content {
        border-radius: var(--radius-md);
        max-width: 100%;
        margin: 0;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Admin detail */
    .admin-detail-header {
        padding: 15px;
        margin-bottom: 15px;
        flex-direction: column;
        gap: 15px;
    }

    .admin-detail-stats {
        width: 100%;
        justify-content: space-between;
    }

    .admin-breadcrumb {
        margin-bottom: 15px;
    }

    /* Settings */
    .admin-settings-content {
        padding: 15px;
    }

    .admin-setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .admin-setting-control {
        width: 100%;
        justify-content: space-between;
    }

    /* Info box */
    .admin-info-box {
        padding: 12px 15px;
        margin-bottom: 15px;
    }

    /* Empty state */
    .admin-empty-state {
        padding: 30px 15px;
    }

    .admin-empty-state svg {
        width: 40px;
        height: 40px;
    }

    /* Nav horizontal admin */
    .admin-nav-horizontal {
        flex-wrap: wrap;
        padding: 4px;
        gap: 4px;
    }

    .admin-nav-tab {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .admin-nav-tab span {
        display: none;
    }

    .admin-nav-tab svg {
        width: 16px;
        height: 16px;
    }
}

/* ================================
   TRÈS PETITS ÉCRANS (< 480px)
   ================================ */

@media (max-width: 480px) {
    :root {
        --topbar-height: 56px;
    }

    .topbar {
        padding: 0 12px;
    }

    .sidebar-toggle {
        width: 40px;
        height: 40px;
    }

    .sidebar-toggle svg {
        width: 20px;
        height: 20px;
    }

    .page-title {
        font-size: 0.9rem;
        max-width: 100%;
    }

    /* Mobile menu ajustements */
    .mobile-menu-header {
        padding: 12px;
    }

    .mobile-menu-nav {
        padding: 12px;
    }

    .mobile-menu-link {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .mobile-menu-footer {
        padding: 12px;
    }

    .topbar-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
    }

    .main-content {
        padding: 10px;
    }

    /* Cards */
    .card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .card-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .card-title {
        font-size: 0.95rem;
    }

    /* Admin stats */
    .admin-stats-grid {
        gap: 8px;
    }

    .admin-stat-card {
        padding: 10px;
        gap: 8px;
    }

    .admin-stat-value {
        font-size: 1.1rem;
    }

    .admin-stat-icon {
        width: 32px;
        height: 32px;
    }

    .admin-stat-icon svg {
        width: 16px;
        height: 16px;
    }

    /* Tables */
    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    /* Boutons */
    .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Typography */
    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1rem;
    }

    .lead {
        font-size: 0.8rem;
    }

    /* Formulaires */
    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    /* Modal */
    .modal {
        padding: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 12px;
    }

    /* Nav admin */
    .admin-nav-tab {
        padding: 8px;
    }

    /* Quick actions */
    .admin-action-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* ================================
   ÉCRANS ULTRA-PETITS (< 360px)
   ================================ */

@media (max-width: 360px) {
    .main-content {
        padding: 10px;
    }

    .card {
        padding: 12px;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        max-width: 100%;
        font-size: 0.85rem;
    }

    .sidebar-toggle {
        width: 38px;
        height: 38px;
    }

    .sidebar-toggle svg {
        width: 18px;
        height: 18px;
    }

    /* Mobile menu ajustements petits écrans */
    .mobile-menu-header {
        padding: 10px 12px;
    }

    .mobile-menu-logo img {
        height: 24px;
    }

    .mobile-menu-nav {
        padding: 10px 12px;
        gap: 4px;
    }

    .mobile-menu-link {
        padding: 12px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .mobile-menu-link svg {
        width: 18px;
        height: 18px;
    }

    .mobile-menu-footer {
        padding: 10px 12px;
    }

    .mobile-menu-theme {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .admin-nav-horizontal {
        flex-direction: column;
    }

    .admin-nav-tab {
        min-width: 100%;
    }
}

/* ================================
   UTILITAIRES
   ================================ */

.text-primary {
    color: var(--color-primary);
}

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

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 16px;
}

/* ================================
   ADMIN - MENU HORIZONTAL
   ================================ */

.admin-nav-horizontal {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.admin-nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.admin-nav-tab svg {
    width: 18px;
    height: 18px;
}

.admin-nav-tab:hover:not(.disabled) {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.admin-nav-tab.active {
    background: var(--color-primary);
    color: var(--color-dark);
}

.admin-nav-tab.disabled {
    opacity: 0.4;
    cursor: url('/assets/cursors/dark/no.cur'), not-allowed;
}

@media (max-width: 640px) {
    .admin-nav-horizontal {
        flex-wrap: wrap;
    }

    .admin-nav-tab span {
        display: none;
    }

    .admin-nav-tab {
        padding: 10px 12px;
    }
}

/* ================================
   ADMIN - STATS GRID
   ================================ */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.admin-stat-card:hover {
    box-shadow: var(--shadow-md);
}

.admin-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-stat-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.admin-stat-icon.purple {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.admin-stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.admin-stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.admin-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.admin-stat-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.admin-stat-content {
    display: flex;
    flex-direction: column;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ================================
   ADMIN - STATS ROW (secondaires)
   ================================ */

.admin-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-stat-mini {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-stat-mini-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.admin-stat-mini-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ================================
   ADMIN - QUICK ACTIONS
   ================================ */

.admin-quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
}

.admin-action-btn svg {
    width: 18px;
    height: 18px;
}

.admin-action-btn.primary {
    background: var(--color-primary);
    color: var(--color-dark);
}

.admin-action-btn.primary:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-glow);
}

.admin-action-btn.secondary {
    background: var(--color-surface);
    color: var(--color-text);
}

.admin-action-btn.secondary:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}

/* ================================
   ADMIN - CARD
   ================================ */

.admin-card {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-bg);
}

.admin-card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.admin-card-header h2 svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.admin-card-badge {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 4px 10px;
    border-radius: 20px;
}

.admin-card-actions {
    display: flex;
    gap: 8px;
}

/* ================================
   ADMIN - EMPTY STATE
   ================================ */

.admin-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--color-text-muted);
}

.admin-empty-state svg {
    width: 56px;
    height: 56px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.admin-empty-state h3 {
    color: var(--color-text);
    margin-bottom: 8px;
    font-size: 1rem;
}

.admin-empty-state p {
    margin-bottom: 20px;
    font-size: 0.875rem;
}

/* ================================
   ADMIN - TABLE
   ================================ */

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-bg);
}

.admin-table td {
    border-bottom: 1px solid var(--color-bg);
    vertical-align: middle;
    font-size: 0.875rem;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--color-surface-hover);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table-client {
    display: flex;
    flex-direction: column;
}

.admin-table-client strong {
    color: var(--color-text);
    font-size: 0.875rem;
}

.admin-table-client span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.admin-table-date {
    display: flex;
    flex-direction: column;
    color: var(--color-text);
    font-size: 0.875rem;
}

.admin-table-date small {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.admin-table-muted {
    color: var(--color-text-muted);
}

.admin-table-actions {
    display: flex;
    gap: 6px;
}

.admin-table-files {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-file-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-file-tag svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.admin-file-tag.pages {
    border-left: 2px solid var(--color-info);
}

.admin-file-tag.keywords {
    border-left: 2px solid var(--color-warning);
}

.admin-table-counts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8rem;
}

.admin-table-counts span {
    color: var(--color-text-muted);
}

.admin-table-size,
.admin-table-time {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: 'SF Mono', Monaco, monospace;
}

/* ================================
   ADMIN - STATUS BADGES
   ================================ */

.admin-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.admin-status.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
}

.admin-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.admin-status.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

/* ================================
   ADMIN - BUTTONS
   ================================ */

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.admin-btn.primary {
    background: var(--color-primary);
    color: var(--color-dark);
}

.admin-btn.primary:hover {
    background: var(--color-primary-hover);
}

.admin-btn.secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text);
}

.admin-btn.secondary:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}

.admin-btn.small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.admin-btn.small svg {
    width: 14px;
    height: 14px;
}

.admin-btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.admin-btn-icon svg {
    width: 16px;
    height: 16px;
}

.admin-btn-icon:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

.admin-btn-icon.danger:hover {
    background: var(--color-danger);
    color: white;
}

/* Admin Actions (table row actions) */
.admin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-action-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
    text-decoration: none;
    padding: 0;
}

.admin-action-icon svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.admin-action-icon:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.admin-action-icon.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

/* ================================
   ADMIN - INFO BOX
   ================================ */

.admin-info-box {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--color-info);
}

.admin-info-box.hidden {
    display: none;
}

.admin-info-box svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.admin-info-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.admin-info-box p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.admin-info-box a {
    color: inherit;
    text-decoration: underline;
}

/* ================================
   ADMIN - SETTINGS
   ================================ */

.admin-settings-card {
    margin-bottom: 20px;
}

.admin-settings-content {
    padding: 20px;
}

.admin-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-bg);
}

.admin-setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.admin-setting-row:first-child {
    padding-top: 0;
}

.admin-setting-info label {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.admin-setting-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.admin-setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.admin-number-input {
    display: flex;
    align-items: center;
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
}

.admin-number-input:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.admin-number-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-number-btn:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

.admin-number-btn:active {
    opacity: 0.8;
}

.admin-number-value {
    width: 60px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--color-surface);
    border-right: 1px solid var(--color-surface);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    -moz-appearance: textfield;
}

.admin-number-value::-webkit-outer-spin-button,
.admin-number-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.admin-number-value:focus {
    outline: none;
}

.admin-setting-unit {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.admin-btn.small {
    padding: 10px 16px;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .admin-setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ================================
   ADMIN - DETAIL PAGE
   ================================ */

.admin-breadcrumb {
    margin-bottom: 20px;
}

.admin-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.admin-breadcrumb a:hover {
    color: var(--color-primary);
}

.admin-breadcrumb svg {
    width: 16px;
    height: 16px;
}

.admin-detail-header {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-detail-info h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.admin-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.admin-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-detail-meta svg {
    width: 14px;
    height: 14px;
}

.admin-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.admin-detail-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-detail-stat .label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-detail-stat .value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.admin-error-box {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    color: var(--color-danger);
}

.admin-error-box svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-error-box strong {
    display: block;
    margin-bottom: 4px;
}

.admin-error-box p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.admin-sql-preview {
    background: #1a1a2e;
    border-radius: var(--radius-md);
    max-height: 500px;
    overflow: auto;
}

.admin-sql-preview pre {
    margin: 0;
    padding: 16px;
}

.admin-sql-preview code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #a5d6ff;
    white-space: pre-wrap;
    word-break: break-all;
}

.admin-tech-info {
    padding: 16px;
}

.admin-tech-row {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-bg);
}

.admin-tech-row:last-child {
    border-bottom: none;
}

.admin-tech-row .label {
    width: 120px;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.admin-tech-row .value {
    font-size: 0.85rem;
    color: var(--color-text);
    word-break: break-all;
}

.admin-tech-row .value.small {
    font-size: 0.75rem;
}

/* ================================
   ADMIN - TOAST
   ================================ */

.admin-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-toast {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: slideInToast 0.3s ease;
}

.admin-toast.success {
    border-left: 3px solid var(--color-success);
}

.admin-toast.error {
    border-left: 3px solid var(--color-danger);
}

.admin-toast strong {
    color: var(--color-text);
    margin-bottom: 2px;
    font-size: 0.875rem;
}

.admin-toast span {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================================
   ADMIN - FILTERS BAR
   ================================ */

.admin-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-bg);
    flex-wrap: wrap;
}

.admin-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-search-box {
    position: relative;
}

.admin-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-text-subtle);
    pointer-events: none;
}

.admin-search-input {
    width: 220px;
    padding: 8px 12px 8px 38px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 0.85rem;
    transition: var(--transition);
}

.admin-search-input::placeholder {
    color: var(--color-text-subtle);
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(246, 210, 16, 0.1);
}

.admin-filter-select {
    padding: 8px 32px 8px 12px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-size: 0.85rem;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.admin-filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

@media (max-width: 640px) {
    .admin-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filter-group {
        width: 100%;
    }

    .admin-search-input {
        width: 100%;
    }

    .admin-filter-select {
        flex: 1;
    }
}

/* ================================
   ADMIN - CHECKBOXES
   ================================ */

.admin-th-checkbox,
.admin-td-checkbox {
    width: 48px;
    text-align: center;
}

.admin-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
}

.admin-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-checkbox-mark {
    width: 18px;
    height: 18px;
    background: var(--color-bg);
    border: 2px solid var(--color-surface-hover);
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-checkbox-mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23020202' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(0);
    transition: all 0.15s ease;
}

.admin-checkbox input:checked+.admin-checkbox-mark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.admin-checkbox input:checked+.admin-checkbox-mark::after {
    opacity: 1;
    transform: scale(1);
}

.admin-checkbox input:indeterminate+.admin-checkbox-mark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.admin-checkbox input:indeterminate+.admin-checkbox-mark::after {
    width: 8px;
    height: 2px;
    background: var(--color-dark);
    background-image: none;
    opacity: 1;
    transform: scale(1);
    border-radius: 1px;
}

.admin-checkbox:hover .admin-checkbox-mark {
    border-color: var(--color-primary);
}

/* ================================
   ADMIN - PAGINATION
   ================================ */

.admin-pagination {
    padding: 15px 20px;
    border-top: 1px solid var(--color-bg);
}

.admin-pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.admin-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.admin-page-btn svg {
    width: 16px;
    height: 16px;
}

.admin-page-btn:hover:not(.disabled):not(.active) {
    background: var(--color-surface-hover);
    border-color: var(--color-border-light);
    color: var(--color-text);
}

.admin-page-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-dark);
}

.admin-page-btn.disabled {
    opacity: 0.4;
    cursor: url('/assets/cursors/dark/no.cur'), not-allowed;
}

.admin-page-ellipsis {
    padding: 0 8px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ================================
   ADMIN - BULK ACTIONS BAR
   ================================ */

.admin-bulk-actions {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: bottom 0.3s ease;
}

.admin-bulk-actions.visible {
    bottom: 24px;
}

.admin-bulk-info {
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 500;
}

.admin-bulk-info span {
    color: var(--color-primary);
    font-weight: 600;
}

.admin-bulk-buttons {
    display: flex;
    gap: 8px;
}

.admin-btn.danger {
    background: var(--color-danger);
    color: white;
}

.admin-btn.danger:hover {
    background: #dc2626;
}

.admin-btn.danger svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 640px) {
    .admin-bulk-actions {
        left: 16px;
        right: 16px;
        transform: none;
        flex-direction: column;
        gap: 12px;
    }

    .admin-bulk-buttons {
        width: 100%;
    }

    .admin-bulk-buttons .admin-btn {
        flex: 1;
    }
}

/* ================================
   BADGES
   ================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.badge-muted {
    background: var(--color-surface-hover);
    color: var(--color-text-muted);
}

/* ================================
   BUTTONS VARIATIONS
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
    border: none;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: url('/assets/cursors/dark/no.cur'), not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-dark);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-surface-hover);
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-surface-hover);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-surface-hover);
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1rem;
}

/* ================================
   MODALS
   ================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow: auto;
    width: 100%;
    max-width: 500px;
    animation: modalIn 0.2s ease-out;
}

.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 900px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--color-bg);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--color-bg);
}

/* ================================
   TEXT MUTED
   ================================ */

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

/* ================================
   SPINNERS
   ================================ */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.spinner-sm {
    width: 12px;
    height: 12px;
    border-width: 1.5px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   VARIABLES ALIASES
   ================================ */

:root {
    --bg-primary: var(--color-bg);
    --bg-secondary: var(--color-surface);
    --bg-tertiary: var(--color-surface-hover);
    --text-primary: var(--color-text);
    --text-muted: var(--color-text-muted);
    --border-color: var(--color-border);
    --primary: var(--color-primary);
    --success: var(--color-success);
    --warning: var(--color-warning);
    --danger: var(--color-danger);
}

/* ================================
   PAGE: PROJECT SHOW
   ================================ */

.project-page {
    padding: 0;
    max-width: none;
    margin: 0;
}

/* Project Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-bg);
    gap: 15px;
    flex-wrap: wrap;
}

.project-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-meta code {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-surface);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.project-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.project-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Progress Box */
.progress-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-box .progress-bar {
    width: 80px;
    height: 6px;
    background: var(--color-surface);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 10px;
    transition: width 0.3s;
}

.progress-box span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Project Badges */
.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.badge-muted {
    background: var(--color-surface);
    color: var(--color-text-muted);
}

/* Text Cards */
.texts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.text-card {
    background: var(--color-surface);
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.2s;
}

.text-card.validated {
    border-left: 4px solid #22c55e;
}

.text-card.pending {
    border-left: 4px solid #ffd388;
}

.text-card.expanded {
    box-shadow: var(--shadow-md);
}

.text-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.575rem 1rem;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: background 0.15s;
    overflow: hidden;
    min-width: 0;
}

.text-card-header:hover {
    background: var(--color-surface-hover);
}

.text-card-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.text-card-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.validated {
    background: #22c55e;
}

.status-dot.pending {
    background: #ffd388;
}

.type-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.type-badge-act {
    background: #f0e6ff;
    color: #7c3aed;
}

.type-badge-seo {
    background: #dbeafe;
    color: #000000;
}

.text-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.word-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.btn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-pill);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.15s;
    background: var(--color-bg);
    color: var(--color-text-muted);
}

.btn-toggle:hover {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.btn-toggle.active {
    background: #22c55e;
    color: white;
}

.btn-toggle.active:hover {
    background: #16a34a;
}

.chevron {
    display: flex;
    color: var(--color-text-muted);
    transition: transform 0.2s;
}

.text-card.expanded .chevron {
    transform: rotate(180deg);
}

/* Card body */
.text-card-body {
    border-top: 1px solid var(--color-bg);
    padding: 20px;
    background: var(--color-bg);
    min-width: 0;
}

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

.form-group-full {
    grid-column: 1 / -1;
}

.meta-counter {
    font-weight: 400;
    opacity: 0.7;
}

.meta-textarea {
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Content editor */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 0;
}

.toggle-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    background: var(--color-bg);
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.15s;
}

.toggle-btn:first-child {
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

.toggle-btn:last-child {
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.toggle-btn.active {
    background: var(--color-primary);
    color: #000;
}

.editor-visual {
    min-height: 300px;
    padding: 15px;
    background: white;
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-y: auto;
    overflow-wrap: break-word;
    word-break: break-word;
}

.editor-visual:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.editor-visual h2 {
    font-size: 1.15rem;
    margin: 1.25rem 0 0.5rem;
    color: #111;
}

.editor-visual h2:first-child {
    margin-top: 0;
}

.editor-visual h3 {
    font-size: 1rem;
    margin: 1rem 0 0.4rem;
    color: #222;
}

.editor-visual p {
    margin: 0 0 0.75rem;
}

.editor-visual ul,
.editor-visual ol {
    margin: 0 0 0.75rem 1.5rem;
    padding: 0;
}

.editor-visual li {
    margin-bottom: 0.25rem;
}

.editor-html {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    border: none;
    border-radius: var(--radius-md);
    background: #1e1e2e;
    color: #cdd6f4;
    resize: vertical;
}

.editor-html:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 0.75rem;
    min-height: 2rem;
}

.autosave-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.autosave-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.autosave-toast.saved {
    background: #dcfce7;
    color: #16a34a;
}

.autosave-toast.saving {
    background: #fff;
    color: #666;
}

.autosave-toast.error {
    background: #fee2e2;
    color: #dc2626;
}

@keyframes autosave-spin {
    to {
        transform: rotate(360deg);
    }
}

.autosave-toast .spin-icon {
    animation: autosave-spin 1s linear infinite;
}

/* Project Show - Responsive */
@media (max-width: 768px) {
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .project-header h1 {
        font-size: 1.1rem;
    }

    .project-header-left {
        gap: 0.75rem;
    }

    .back-btn {
        width: 32px;
        height: 32px;
    }

    .project-header-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .project-header-right .btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .progress-box {
        width: 100%;
        justify-content: space-between;
    }

    .progress-box .progress-bar {
        flex: 1;
        max-width: 120px;
    }

    .texts-list {
        gap: 0.375rem;
    }

    .text-card {
        border-radius: 10px;
        overflow: hidden;
    }

    .text-card-header {
        padding: 0.75rem;
    }

    .text-card-left {
        gap: 0.4rem;
        min-width: 0;
    }

    .text-card-right {
        gap: 0.4rem;
    }

    .type-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }

    .text-title {
        font-size: 0.85rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-toggle span {
        display: none;
    }

    .word-count {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        display: none;
    }

    .btn-toggle {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .btn-toggle svg {
        width: 12px;
        height: 12px;
    }

    .text-card-body {
        padding: 15px;
        overflow-x: hidden;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .content-header-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .field-header {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .btn-ai-inline {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .btn-copy-html {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .editor-visual {
        min-height: 200px;
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .editor-html {
        min-height: 200px;
        padding: 0.75rem;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .toggle-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .form-footer {
        padding-top: 0.75rem;
    }

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

@media (max-width: 480px) {
    .project-header {
        gap: 0.75rem;
    }

    .project-header h1 {
        font-size: 1rem;
    }

    .project-meta code {
        font-size: 0.7rem;
    }

    .progress-box span {
        font-size: 0.75rem;
    }

    .text-card {
        border-radius: 8px;
    }

    .text-card-header {
        padding: 0.6rem 0.75rem;
    }

    .text-card-left {
        gap: 0.4rem;
    }

    .status-dot {
        width: 8px;
        height: 8px;
    }

    .type-badge {
        font-size: 0.55rem;
    }

    .text-title {
        font-size: 0.8rem;
    }

    .btn-toggle span {
        display: none;
    }

    .btn-toggle {
        padding: 0.3rem;
        font-size: 0.65rem;
    }

    .btn-toggle svg {
        width: 14px;
        height: 14px;
    }

    .chevron svg {
        width: 14px;
        height: 14px;
    }

    .text-card-body {
        padding: 12px;
    }

    .editor-visual {
        min-height: 180px;
        padding: 0.6rem;
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .editor-html {
        min-height: 180px;
        padding: 0.6rem;
        font-size: 0.75rem;
    }

    .toggle-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }

    .form-footer {
        padding-top: 0.6rem;
    }
}

@media (max-width: 360px) {
    .project-header h1 {
        font-size: 0.9rem;
    }

    .project-meta {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .back-btn {
        width: 28px;
        height: 28px;
    }

    .back-btn svg {
        width: 14px;
        height: 14px;
    }

    .text-card-header {
        padding: 0.5rem 0.6rem;
    }

    .text-title {
        font-size: 0.75rem;
    }

    .btn-toggle {
        padding: 0.25rem 0.35rem;
    }

    .btn-toggle span {
        display: none;
    }

    .btn-toggle svg {
        width: 12px;
        height: 12px;
    }

    .text-card-body {
        padding: 10px;
    }

    .editor-visual {
        min-height: 150px;
    }

    .editor-html {
        min-height: 150px;
    }
}

/* ================================
   PAGE: PROJECTS INDEX
   ================================ */

.projects-page {
    padding: 0;
}

/* Projects Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.stats-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.pill.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.pill.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.pill.purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Filters */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
}

.search-box input {
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 0.9rem;
    width: 180px;
    outline: none;
}

.filter-select {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-text);
}

.results-count {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.btn-filter {
    background: var(--color-surface);
    color: var(--color-text);
    border: none;
    padding: 8px 15px;
}

.btn-filter:hover {
    background: var(--color-surface-hover);
}

.btn-cancel {
    background: var(--color-surface);
    color: var(--color-text);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Projects Table */
.projects-table {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.projects-table table {
    width: 100%;
    border-collapse: collapse;
}

.projects-table th {
    text-align: left;
    padding: 10px 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-bg);
}

.projects-table th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.projects-table th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.projects-table tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg);
}

.projects-table tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg);
}

.projects-table td {
    padding: 5px 15px;
    border-bottom: 1px solid var(--color-bg);
    vertical-align: middle;
    font-size: 0.9rem;
}

.projects-table tr:last-child td {
    border-bottom: none;
}

.clickable-row {
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: background 0.15s;
}

.clickable-row:hover td {
    background: var(--color-surface-hover);
}

.projects-table code {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.client-cell strong {
    display: block;
    font-weight: 500;
}

.client-cell small {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.date-cell {
    color: var(--color-text-muted);
}

/* Progress Cell */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.progress-bar {
    width: 60px;
    height: 6px;
    background: var(--color-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar>div {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 10px;
}

.progress-cell span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Badge */
/* Dropdown */
.actions-cell {
    width: 50px;
    text-align: center;
}

.dropdown {
    position: relative;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.15s;
}

.menu-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 160px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.875rem;
    font-size: 0.85rem;
    color: var(--color-text);
    background: none;
    border: none;
    text-align: left;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: var(--color-surface-hover);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--color-bg);
    margin: 4px 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--color-surface-hover);
}

.page-info {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Empty State (page-specific) */
.projects-page .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    background: var(--color-surface);
    border-radius: 14px;
    color: var(--color-text-muted);
}

.projects-page .empty-state a {
    color: var(--color-primary);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-box {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    max-width: 360px;
    width: 90%;
    text-align: center;
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.modal-box h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.modal-box p {
    margin: 0 0 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* Mobile/Desktop visibility */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

/* Project Cards Mobile */
.projects-cards {
    flex-direction: column;
    gap: 0.75rem;
}

.project-card {
    display: block;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.project-card-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.project-card-title strong {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-title code {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    width: fit-content;
}

.project-card-body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.project-card-sector {
    background: var(--color-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--color-bg);
}

.project-card-footer .progress-cell {
    flex: 1;
}

.project-card-footer .progress-bar {
    width: 100px;
}

.project-card-footer .menu-btn {
    flex-shrink: 0;
}

/* Projects Index - Responsive */
@media (max-width: 768px) {
    .projects-page .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .projects-page .page-header h1 {
        font-size: 1.25rem;
    }

    .page-header-left {
        gap: 0.75rem;
    }

    .stats-pills {
        margin-top: 0.25rem;
        gap: 0.375rem;
    }

    .pill {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .results-count {
        display: none;
    }

    .filters-bar {
        gap: 0.5rem;
    }

    .search-box {
        padding: 0.4rem 0.6rem;
        flex: 1;
        min-width: 0;
    }

    .search-box input {
        width: 100%;
        min-width: 80px;
        font-size: 0.85rem;
    }

    .filter-select {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .btn-filter {
        padding: 0.4rem 0.75rem;
    }

    .pagination {
        padding: 0.75rem;
    }

    .modal-box {
        padding: 1.25rem;
        max-width: 90%;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .projects-cards {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .projects-page .page-header h1 {
        font-size: 1.1rem;
    }

    .stats-pills {
        width: 100%;
    }

    .pill {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .filters-bar {
        flex-wrap: wrap;
    }

    .search-box {
        flex: 1 1 100%;
    }

    .filter-select {
        flex: 1;
    }

    .projects-cards {
        gap: 0.5rem;
    }

    .project-card {
        padding: 0.875rem;
        border-radius: 10px;
    }

    .project-card-title strong {
        font-size: 0.9rem;
    }

    .project-card-body {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }

    .project-card-footer {
        padding-top: 0.6rem;
    }

    .project-card-footer .progress-bar {
        width: 80px;
    }

    .menu-btn {
        width: 28px;
        height: 28px;
    }

    .modal-box {
        padding: 1rem;
    }

    .modal-box h3 {
        font-size: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .projects-page .page-header h1 {
        font-size: 1rem;
    }

    .stats-pills {
        gap: 0.25rem;
    }

    .pill {
        font-size: 0.65rem;
    }

    .project-card {
        padding: 0.75rem;
    }

    .project-card-title strong {
        font-size: 0.85rem;
    }

    .project-card-title code {
        font-size: 0.65rem;
    }

    .project-card-body {
        font-size: 0.7rem;
        gap: 0.5rem;
    }

    .project-card-footer .progress-bar {
        width: 60px;
    }

    .progress-cell span {
        font-size: 0.7rem;
    }
}

/* ================================
   PAGE: SQL GENERATOR
   ================================ */

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Progress Bar Container */
.progress-bar-container {
    margin-top: 20px;
    width: 100%;
    height: 50px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: none;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent, var(--color-primary-hover)));
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text);
    font-weight: 500;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Upload Grid */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.upload-box {
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.upload-box:hover {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.upload-box h3 {
    color: var(--color-primary);
    margin-bottom: 8px;
}

.upload-desc {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.upload-desc code {
    background: var(--color-surface-elevated);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--color-primary);
}

/* Format Guide */
.format-guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.format-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: none;
}

.format-style {
    min-width: 160px;
    padding: 6px 12px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}

.format-bold {
    font-weight: bold;
}

.format-italic {
    font-style: italic;
}

.format-underline {
    text-decoration: underline;
}

.format-arrow {
    color: var(--color-primary);
    font-weight: bold;
}

.format-result {
    color: var(--color-text-muted);
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.mode-tab:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.mode-tab.active {
    background: var(--color-primary);
    color: var(--color-dark);
}

.mode-tab svg {
    width: 20px;
    height: 20px;
}

/* Manual Section */
.manual-section {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-lg);
}

.section-header-manual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.section-header-manual h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.section-desc code {
    background: var(--color-surface-elevated);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--color-primary);
}

.manual-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sql-generator .empty-state {
    padding: 30px 20px;
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
}

.manual-item {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.manual-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--color-surface-elevated);
    border-bottom: 1px solid var(--color-bg);
}

.item-number {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.btn-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: var(--transition);
}

.btn-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.manual-item-content {
    padding: 16px;
}

.manual-item-content .form-group {
    margin-bottom: 12px;
}

.manual-item-content .form-group:last-child {
    margin-bottom: 0;
}

.manual-item-content label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.manual-item-content input,
.manual-item-content textarea {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.manual-item-content input:focus,
.manual-item-content textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

.manual-item-content textarea {
    resize: vertical;
    min-height: 60px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
}

/* Steps Guide */
.steps-guide {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: var(--color-dark);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-content h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: var(--color-text);
}

.step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Manual Section Form */
.manual-section h3 {
    margin: 0 0 8px 0;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.optional-label {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--color-text-muted);
}

.manual-section .form-group {
    margin-bottom: 16px;
}

.manual-section .form-group:last-child {
    margin-bottom: 0;
}

.manual-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.manual-section input,
.manual-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.manual-section input:focus,
.manual-section textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.1);
}

/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.2s ease;
}

.custom-select-trigger:hover {
    background: var(--color-surface-elevated);
    box-shadow: var(--shadow-md);
}

.custom-select-trigger:hover .select-icon,
.custom-select-trigger:hover .select-arrow {
    color: var(--color-primary);
}

.custom-select.open .custom-select-trigger {
    box-shadow: 0 0 0 3px var(--color-primary-soft);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-trigger .select-icon {
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.custom-select-trigger .select-value {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.custom-select-trigger .select-arrow {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.custom-select.open .select-icon {
    color: var(--color-primary);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--color-bg);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: var(--color-surface-elevated);
}

.custom-select-option.selected {
    background: rgba(255, 215, 0, 0.08);
}

.custom-select-option:hover.selected {
    background: rgba(255, 215, 0, 0.12);
}

.custom-select-option .option-icon {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.custom-select-option:hover .option-icon,
.custom-select-option.selected .option-icon {
    color: var(--color-primary);
}

.custom-select-option .option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-select-option .option-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.custom-select-option .option-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.custom-select-option.selected .option-label {
    color: var(--color-primary);
}

.custom-select-option .option-check {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s ease;
}

.custom-select-option.selected .option-check {
    opacity: 1;
    transform: scale(1);
}

.keywords-textarea {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
}

.keywords-count {
    margin-top: 8px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.keywords-count span {
    font-weight: 700;
    color: var(--color-primary);
}

/* Activities Preview Tags */
.activities-preview {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.activity-tag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.activity-tag-name {
    font-weight: 500;
    color: var(--color-text);
}

.activity-tag.has-notes {
    background: rgba(246, 210, 16, 0.05);
    box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.activity-tag-note-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--color-bg);
    border: none;
    border-radius: 6px;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    color: var(--color-text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.activity-tag-note-btn:hover {
    background: rgba(246, 210, 16, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.activity-tag.has-notes .activity-tag-note-btn {
    background: rgba(246, 210, 16, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.activity-note-wrapper {
    width: 100%;
}

.activity-note-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
    transition: box-shadow 0.2s ease;
}

.activity-note-input:focus {
    box-shadow: 0 0 0 3px rgba(246, 210, 16, 0.15);
}

.activity-note-input::placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Brief Section in Project View */
.brief-section {
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
    overflow: hidden;
}

.brief-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: background 0.2s ease;
}

.brief-header:hover {
    background: var(--color-bg);
}

.brief-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

.brief-toggle-icon {
    transition: transform 0.2s ease;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.brief-section.collapsed .brief-toggle-icon {
    transform: rotate(-90deg);
}

.brief-body {
    padding: 0 20px 16px;
}

.brief-textarea {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.6;
    resize: none;
    overflow-y: auto;
    transition: box-shadow 0.2s ease;
}

.brief-textarea::placeholder {
    color: var(--color-text-subtle);
    line-height: 1.6;
}

.brief-textarea:hover {
    border-color: var(--color-border-light);
}

.brief-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(246, 210, 16, 0.15);
    background: var(--color-surface);
}

/* Notes textarea in activity cards */
.notes-textarea {
    min-height: 0 !important;
    resize: none;
    overflow: hidden;
    line-height: 1.5;
}

.brief-autosave {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Dépôt d'un document client analysé par l'IA (projets + textes rapides) */
.doc-drop-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 12px 15px;
    background: var(--color-bg);
    border: 1px dashed var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.doc-drop-zone:hover,
.doc-drop-zone.dragover {
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.doc-drop-zone.loading {
    opacity: 0.6;
    pointer-events: none;
}

.doc-drop-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.4;
}

.doc-drop-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.doc-drop-text span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.doc-status {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.doc-status:empty {
    margin-top: 0;
}

.doc-status-error {
    color: var(--danger);
}

.doc-status-success {
    color: var(--success);
}

.doc-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--color-text);
}

.doc-item svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.doc-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-item-meta {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.doc-item-delete {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: color 0.2s ease;
}

.doc-item-delete:hover {
    color: var(--danger);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Content Grid Two Columns */
.content-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.content-grid-two .manual-section {
    margin-bottom: 0;
}

.content-grid-two .keywords-textarea {
    min-height: 180px;
}

/* Loading Modal */
.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-modal.active {
    display: flex;
}

.loading-modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 20px 30px;
    max-width: 750px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: none;
}

.loading-header {
    text-align: center;
    margin-bottom: 16px;
}

.loading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent, var(--color-primary-hover)));
    border-radius: 50%;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.loading-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-dark);
    animation: spin 2s linear infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(255, 215, 0, 0.2);
    }
}

.loading-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    color: var(--color-text);
}

.loading-subtitle {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.loading-progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.loading-progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.loading-progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.loading-progress-circle .progress-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 8;
}

.loading-progress-circle .progress-fill {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.loading-details {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}

.loading-current {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-bg);
}

.loading-label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.loading-value {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    font-size: 1.5rem;
    color: var(--color-border);
    font-weight: 300;
}

.loading-items-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

.loading-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-surface);
    transition: background 0.2s ease;
}

.loading-item:last-child {
    border-bottom: none;
}

.loading-item.loading {
    background: rgba(255, 215, 0, 0.1);
}

.loading-item.done {
    opacity: 0.6;
}

.loading-item.error {
    opacity: 0.7;
    background: rgba(239, 68, 68, 0.1);
}

.loading-item.error .item-status svg {
    color: #ef4444;
}

.loading-item.error .item-name {
    color: #ef4444;
}

.item-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.item-status svg {
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
}

.loading-item.done .item-status svg {
    color: #10b981;
}

.loading-item.loading .item-status {
    color: var(--color-primary);
}

.item-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.item-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--color-surface-elevated);
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.loading-item.loading .item-type {
    background: var(--color-primary);
    color: var(--color-dark);
}

.item-name {
    font-size: 0.85rem;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading-tips {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: none;
}

.tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    transition: opacity 0.3s ease;
}

/* Loading Modal - Bouton Minimiser */
.loading-minimize-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-md);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    color: var(--color-text-muted);
    transition: all 0.2s ease;
    z-index: 10;
}

.loading-minimize-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

/* Loading Modal - Animation de fermeture */
.loading-modal.minimizing {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Barre de progression minimisée */
.loading-minimized-bar {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 12px 15px;
    box-shadow: var(--shadow-lg);
    align-items: center;
    gap: 15px;
    min-width: 300px;
    max-width: 420px;
    animation: slideInMinimized 0.3s ease;
}

.loading-minimized-bar.active {
    display: flex;
}

@keyframes slideInMinimized {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mini cercle de progression */
.minimized-progress-ring {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.minimized-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.minimized-progress-ring .progress-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 3;
}

.minimized-progress-ring .progress-fill {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.minimized-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Infos dans la barre minimisée */
.minimized-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.minimized-current {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.minimized-stats {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Bouton agrandir */
.minimized-expand-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    color: var(--color-dark);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.minimized-expand-btn:hover {
    background: var(--color-primary-hover);
}

/* Responsive - Barre minimisée */
@media (max-width: 480px) {
    .loading-minimized-bar {
        left: 16px;
        right: 16px;
        bottom: 16px;
        min-width: auto;
        max-width: none;
    }
}

/* SQL Generator - Responsive */
@media (max-width: 768px) {
    .mode-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .mode-tab {
        justify-content: center;
        padding: 10px 20px;
    }

    .section-header-manual {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .content-grid-two {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .upload-box {
        padding: 15px;
    }

    .manual-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .format-guide {
        gap: 8px;
        margin: 15px 0;
    }

    .format-item {
        padding: 10px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .format-style {
        min-width: auto;
        padding: 4px 10px;
        font-size: 0.85rem;
    }

    .keywords-textarea {
        min-height: 150px;
        font-size: 0.85rem;
    }

    .content-grid-two .keywords-textarea {
        min-height: 150px;
    }

    .loading-modal {
        padding: 15px;
    }

    .loading-modal-content {
        padding: 15px;
        border-radius: var(--radius-lg);
    }

    .loading-header {
        margin-bottom: 12px;
    }

    .loading-header h2 {
        font-size: 1.1rem;
    }

    .loading-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }

    .loading-icon svg {
        width: 24px;
        height: 24px;
    }

    .loading-progress-container {
        margin-bottom: 12px;
    }

    .loading-progress-circle {
        width: 80px;
        height: 80px;
    }

    .progress-percentage {
        font-size: 1.2rem;
    }

    .loading-details {
        padding: 12px;
        margin-bottom: 10px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .loading-items-list {
        max-height: 120px;
        margin-bottom: 10px;
    }

    .loading-item {
        padding: 6px 10px;
        gap: 8px;
    }

    .loading-tips {
        padding: 8px 12px;
    }

    .tip-text {
        font-size: 0.75rem;
    }

    .progress-bar-container {
        height: 44px;
        margin-top: 15px;
    }

    .progress-bar-text {
        font-size: 0.8rem;
    }

    .custom-select-trigger {
        padding: 10px 12px;
    }

    .custom-select-option {
        padding: 10px 12px;
    }

    .steps-guide {
        gap: 12px;
        margin: 15px 0;
    }

    .step {
        gap: 12px;
    }

    .step-number {
        min-width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .step-content h3 {
        font-size: 0.9rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }
}

/* ================================
   ADMIN LAYOUT - SIDEBAR STYLE
   ================================ */

/* Admin pages: pass height through the chain so admin-layout fills the container */
.main-wrapper-inner:has(.admin-layout) {
    overflow-y: hidden;
}

.main-wrapper-inner:has(.admin-layout) .main-content,
.main-wrapper-inner:has(.admin-layout) .content-wrapper {
    height: 100%;
}

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    height: 100%;
    background: var(--color-bg);
}

/* Admin Sidebar */
.admin-sidebar {
    padding: 0;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 20px 20px 15px;
    border-bottom: none;
}

.admin-sidebar-header h2 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: 0;
}

.admin-sidebar-nav {
    padding: 0px 20px 0px 0px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.admin-sidebar-divider {
    background: var(--color-bg);
}

.admin-sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-sidebar-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.admin-sidebar-link.active {
    background: var(--color-primary);
    color: var(--color-dark);
}

.admin-sidebar-link.active svg {
    color: var(--color-dark);
}

.admin-sidebar-divider {
    height: 1px;
    background: var(--color-border);
    margin: 12px 12px;
}

.admin-sidebar-section {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-subtle);
    padding: 8px 12px 4px;
    margin-top: 4px;
}

/* Admin Main Content */
.admin-main {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-main-header {
    margin-bottom: 20px;
}

.admin-main-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

/* .admin-main-content {
    padding: 0 32px 32px;
} */

/* Responsive Admin Layout */
@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    .main-wrapper-inner:has(.admin-layout) {
        overflow-y: auto;
    }

    .main-wrapper-inner:has(.admin-layout) .main-content,
    .main-wrapper-inner:has(.admin-layout) .content-wrapper {
        height: auto;
    }

    .admin-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .admin-sidebar {
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-bg);
    }

    .admin-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px;
        gap: 4px;
    }

    .admin-sidebar-link {
        padding: 8px 12px;
    }

    .admin-sidebar-link span {
        display: none;
    }

    .admin-sidebar-divider {
        display: none;
    }

    .admin-sidebar-section {
        display: none;
    }

    .admin-sidebar-header {
        display: none;
    }

    .admin-main-header,
    .admin-main-content {
        padding-left: 0px;
        padding-right: 0px;
    }

    .admin-main-header {
        padding-top: 16px;
        margin-bottom: 16px;
    }
}

/* =============================================================================
   AI GENERATION WIDGET - Widget flottant de génération IA (bas droite)
   ============================================================================= */

.ai-gen-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: inherit;
}

/* Version réduite */
.ai-gen-minimized {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    cursor: url('/assets/cursors/dark/arrow.cur'), default;
}

.ai-gen-mini-progress {
    position: relative;
    width: 40px;
    height: 40px;
}

.ai-gen-mini-progress svg {
    transform: rotate(-90deg);
    width: 40px;
    height: 40px;
}

.ai-gen-mini-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 3;
}

.ai-gen-mini-fill {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.ai-gen-mini-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-primary);
}

.ai-gen-mini-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-gen-mini-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
}

.ai-gen-mini-status {
    font-size: 0.7rem;
    color: var(--color-text-subtle);
}

.ai-gen-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--color-bg);
    color: var(--color-text-subtle);
    border-radius: 6px;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.2s ease;
}

.ai-gen-expand-btn:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

/* Version étendue */
.ai-gen-expanded {
    width: 320px;
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.ai-gen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--color-primary), #00d4aa);
    color: var(--color-dark);
}

.ai-gen-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-gen-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ai-gen-pulse 2s ease-in-out infinite;
}

@keyframes ai-gen-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.ai-gen-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.ai-gen-minimize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.15);
    color: var(--color-dark);
    border-radius: 6px;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: background 0.2s ease;
}

.ai-gen-minimize-btn:hover {
    background: rgba(0, 0, 0, 0.25);
}

.ai-gen-progress-bar {
    height: 4px;
    background: var(--color-border);
}

.ai-gen-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #00d4aa);
    transition: width 0.3s ease;
}

.ai-gen-details {
    padding: 16px;
}

.ai-gen-current {
    margin-bottom: 16px;
}

.ai-gen-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-subtle);
    margin-bottom: 4px;
}

.ai-gen-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-gen-stats-row {
    display: flex;
    gap: 16px;
}

.ai-gen-stat {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--color-bg);
    border-radius: 8px;
}

.ai-gen-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.ai-gen-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-subtle);
    margin-top: 2px;
}

.ai-gen-actions {
    padding: 0 16px 16px;
}

.ai-gen-cancel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: none;
    background: var(--color-bg);
    color: var(--color-text-subtle);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: all 0.2s ease;
}

.ai-gen-cancel-btn:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* États */
.ai-gen-widget.success .ai-gen-minimized {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(0, 212, 170, 0.05));
}

.ai-gen-widget.success .ai-gen-mini-fill {
    stroke: #10b981;
}

.ai-gen-widget.success .ai-gen-mini-percent {
    color: #10b981;
}

.ai-gen-widget.success .ai-gen-header {
    background: linear-gradient(135deg, #10b981, #00d4aa);
}

.ai-gen-widget.error .ai-gen-minimized {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.05));
}

.ai-gen-widget.error .ai-gen-mini-fill {
    stroke: #ef4444;
}

.ai-gen-widget.error .ai-gen-header {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.ai-gen-widget.error .ai-gen-progress-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.ai-gen-widget.error .ai-gen-value {
    color: #fca5a5;
    font-size: 0.8rem;
    line-height: 1.4;
}

.ai-gen-widget.error .ai-gen-mini-percent {
    color: #ef4444;
}

.ai-gen-widget.has-warning .ai-gen-value {
    color: #fbbf24;
}

/* Animation de masquage */
.ai-gen-widget.hiding {
    animation: ai-gen-hide 0.3s ease forwards;
}

@keyframes ai-gen-hide {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .ai-gen-widget {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .ai-gen-expanded {
        width: auto;
    }

    .ai-gen-minimized {
        width: 100%;
    }
}

/* ========================================
   Factory Dialog — Composant global
   Remplace confirm(), alert(), prompt()
   ======================================== */

.factory-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fd-overlay-in 0.15s ease;
}

@keyframes fd-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.factory-dialog {
    background: var(--color-surface);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    overflow: hidden;
    animation: fd-dialog-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

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

.factory-dialog-icon {
    display: flex;
    justify-content: center;
    padding: 1.75rem 1.75rem 0;
}

.factory-dialog-icon .fd-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.factory-dialog-icon .fd-icon svg {
    width: 24px;
    height: 24px;
}

.factory-dialog-icon .fd-icon.fd-confirm {
    background: rgba(246, 210, 16, 0.12);
    color: var(--color-primary);
}

.factory-dialog-icon .fd-icon.fd-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--color-warning);
}

.factory-dialog-icon .fd-icon.fd-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
}

.factory-dialog-icon .fd-icon.fd-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--color-success);
}

.factory-dialog-icon .fd-icon.fd-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-info);
}

.factory-dialog-body {
    padding: 1.25rem 1.75rem;
    text-align: center;
}

.factory-dialog-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.35rem;
}

.factory-dialog-message {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

.factory-dialog-input {
    margin-top: 1rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--color-border-light, #252525);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.85rem;
    transition: border-color 0.15s;
}

.factory-dialog-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.factory-dialog-actions {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--color-border, #1e1e1e);
}

.factory-dialog-actions button {
    flex: 1;
    padding: 0.85rem;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: url('/assets/cursors/dark/hand.cur'), pointer;
    transition: background 0.15s;
}

.factory-dialog-actions button:not(:last-child) {
    border-right: 1px solid var(--color-border, #1e1e1e);
}

.factory-dialog-actions .fd-cancel {
    color: var(--color-text-muted);
}

.factory-dialog-actions .fd-cancel:hover {
    background: var(--color-surface-hover);
}

.factory-dialog-actions .fd-ok {
    color: var(--color-primary);
    font-weight: 600;
}

.factory-dialog-actions .fd-ok:hover {
    background: rgba(246, 210, 16, 0.08);
}

.factory-dialog-actions .fd-ok.danger {
    color: var(--color-danger);
}

.factory-dialog-actions .fd-ok.danger:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* ================================
   CURSEURS PERSONNALISÉS - THEME LIGHT
   ================================ */

[data-theme="light"] body {
    cursor: url('/assets/cursors/light/arrow.cur'), default;
}

[data-theme="light"] a,
[data-theme="light"] button,
[data-theme="light"] [role="button"],
[data-theme="light"] .clickable,
[data-theme="light"] [onclick],
[data-theme="light"] label[for],
[data-theme="light"] select,
[data-theme="light"] summary {
    cursor: url('/assets/cursors/light/hand.cur'), pointer;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="search"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="url"],
[data-theme="light"] textarea {
    cursor: url('/assets/cursors/light/ibeam.cur'), text;
}

[data-theme="light"] [disabled],
[data-theme="light"] .disabled {
    cursor: url('/assets/cursors/light/no.cur'), not-allowed;
}