:root {
    /* Color Palette - Premium Vacation Theme */
    --primary: #007AFF;
    --primary-bg: rgba(0, 122, 255, 0.1);
    --accent: #FF2D55;
    --success: #34C759;
    --warning: #FF9F0A;
    --danger: #FF3B30;

    --bg-gradient-start: #a1c4fd;
    --bg-gradient-end: #c2e9fb;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --backdrop-blur: 12px;

    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-main);
    background-image: url('images/bg-beach.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- UTILS --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-md);
}

#app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.title-lg {
    font-size: 2rem;
    margin-bottom: 5px;
}

.title-md {
    font-size: 1.5rem;
}

/* Buttons & Inputs */
.btn {
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Icon Button (Alias for btn-icon / icon-btn) */
.icon-btn,
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    transition: transform 0.2s;
    color: var(--text-main);
    font-size: 1.1rem;
}

.icon-btn:hover,
.btn-icon:hover {
    transform: scale(1.1);
    background: white;
}

.glass-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary);
}

/* --- DASHBOARD --- */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}



/* --- TRIP VIEW (NEW GRID SYSTEM) --- */

/* Header */
/* Header Standardisé */
.header-standard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 10px 0;
    position: relative;
}

.header-standard h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-back {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    /* Squircle */
    border: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: transform 0.2s, background 0.2s;
    z-index: 2;
}

.btn-back:hover {
    transform: scale(1.05);
    background: white;
}

.header-actions {
    display: flex;
    gap: 10px;
    z-index: 2;
}

/* Category */
.category-block {
    margin-bottom: 25px;
}

.category-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    margin-bottom: 15px;
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.95);
}

.cat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.chevron {
    transition: transform 0.3s;
    opacity: 0.5;
}

.category-block.collapsed .chevron {
    transform: rotate(-90deg);
}

.category-block.collapsed .item-list {
    display: none;
}

/* Items List */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ITEM CARD (The premium one) */
.item-card {
    background: rgba(255, 255, 255, 0.75);
    /* Glass feel */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 16px;
    display: grid;
    grid-template-columns: auto auto 1fr;
    /* Drag Handle | Checkbox | Content (Wrapper with Price inside) */
    gap: 12px;
    align-items: start;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: background 0.2s, transform 0.1s;
    position: relative;
}

/* New Edit Btn Style */
.btn-text-action:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-color) !important;
}

/* Drag Handle */
.item-card .drag-handle {
    color: #C7C7CC;
    font-size: 14px;
    cursor: grab;
    padding: 4px 2px;
    line-height: 24px;
    /* Match checkbox height for alignment */
}

.item-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    /* Align to top with title, not center */
    height: 24px;
    cursor: pointer;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #C7C7CC;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.item-card.done .custom-checkbox {
    background: var(--success);
    border-color: var(--success);
}

.custom-checkbox i {
    display: none;
    color: white;
    font-size: 14px;
}

.item-card.done .custom-checkbox i {
    display: block;
}

.item-card.done {
    opacity: 0.7;
    order: 100;
    background: rgba(52, 199, 89, 0.08);
}

.item-card.done h4 {
    text-decoration: line-through;
    color: var(--success);
}

/* Skipped - Pas fait (rouge) */
.item-card.skipped .custom-checkbox {
    background: var(--danger);
    border-color: var(--danger);
}

.item-card.skipped .custom-checkbox i {
    display: block;
}

.item-card.skipped {
    opacity: 0.5;
    order: 200;
    background: rgba(255, 59, 48, 0.08);
}

.item-card.skipped h4 {
    text-decoration: line-through;
    color: var(--danger);
}

/* Content */
.item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.item-header h4 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--text-main);
}

.item-type-icon {
    font-size: 14px;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.item-short-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    max-height: 3.8rem;
    /* Enough for 3 lines with 1.25 line-height */
    overflow: hidden;
    position: relative;
    line-height: 1.25;
    /* Fade out bottom of 3rd line if overflow */
    mask-image: linear-gradient(to bottom, black 2.6rem, transparent 3.6rem);
    -webkit-mask-image: linear-gradient(to bottom, black 2.6rem, transparent 3.6rem);
}

.item-details {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.item-card.expanded .item-details {
    display: block;
}

.item-card.expanded {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* When expanded, show full description without truncation */
.item-card.expanded .item-short-desc {
    max-height: none;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
}

/* Price Badge */
.price-badge {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-block;
}

.price-badge:hover {
    background: rgba(0, 0, 0, 0.1);
}

.price-badge:active {
    transform: scale(0.95);
}

.price-badge.active {
    background: #E5F1FF;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.15);
}

/* Tips */
.item-tips {
    margin-top: 10px;
    background: #FFF9C4;
    color: #5D4037;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Chips & Buttons */
.action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.1s;
}

.chip:hover {
    transform: translateY(-1px);
}

.chip-insta {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 39, 67, 0.3);
}

.chip-map {
    background: #E5F1FF;
    color: var(--primary);
}

/* TikTok - Noir avec accent néon */
.chip-tiktok {
    background: linear-gradient(135deg, #000000 0%, #25F4EE 50%, #FE2C55 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Facebook - Bleu officiel */
.chip-facebook {
    background: #1877F2;
    color: white;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

/* WhatsApp - Vert officiel */
.chip-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Site web / Lien générique */
.chip-website {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Tip standalone (non lié à un item) */
.tip-card-standalone {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFECB3 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.15);
}

.tip-card-standalone i {
    color: #FF9800;
    font-size: 1.2rem;
    margin-top: 2px;
}

.tip-card-standalone .tip-content {
    flex: 1;
    font-size: 0.95rem;
    color: #5D4037;
    line-height: 1.5;
}

/* --- Helper Toggles --- */
.item-details {
    display: none;
}

.item-details.visible {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* --- MODALS & EXTRAS --- */
/* --- UNIFIED MODAL SYSTEM (Premium Glassmorphism) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Base Modal Content - Compact Fix */
.modal-content,
.modal-glass,
.add-item-modal {
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 28px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
    position: relative;
    padding: 0 !important;
    /* Force edge-to-edge for header/footer */
}

.modal-overlay.active .modal-content,
.modal-overlay.active .modal-glass,
.modal-overlay.active .add-item-modal {
    transform: scale(1) translateY(0);
}

/* Toast */
/* Toast - Premium Glass Pill */
#toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
    z-index: 9999;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    white-space: nowrap;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Calc (Minimal) */
/* Calc (Minimal) - Premium Glass Sheet */
#converterModal {
    position: fixed;
    bottom: -100vh;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 32px 32px 0 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 3000;
    padding: 24px;
    transition: bottom 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
}

#converterModal.open {
    bottom: 0;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.calc-btn {
    aspect-ratio: 1;
    border-radius: 50%;
    border: none;
    background: #eee;
    font-size: 1.2rem;
    cursor: pointer;
}

.calc-btn.op {
    background: var(--warning);
    color: white;
}

/* Converter Tabs (Restored) */
.converter-tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.05);
    padding: 5px;
    border-radius: 16px;
}

.conv-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    opacity: 0.6;
}

.conv-tab.active {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--primary);
    opacity: 1;
    transform: scale(1.05);
}

.calc-display {
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: right;
    margin-bottom: 20px;
}

.calc-display-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 1.2em;
}

.calc-display-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow-x: auto;
}

/* Hide scrollbar for calc display */
.calc-display-main::-webkit-scrollbar {
    display: none;
}

/* --- STATUS MODAL (3 états) --- */
/* --- STATUS MODAL (3 états) --- */
.status-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 3000;
    padding: 20px;
}

.status-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 28px;
    padding: 25px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.status-modal-overlay.active .status-modal-content {
    transform: scale(1) translateY(0);
}

.status-modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--text-main);
}

.status-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.status-btn:active {
    transform: scale(0.97);
}

.status-btn.status-done {
    background: linear-gradient(135deg, #34C759 0%, #30B750 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.status-btn.status-skipped {
    background: linear-gradient(135deg, #FF3B30 0%, #E53528 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.status-btn.status-reset {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.status-btn.current {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* --- Unified Modal Internals --- */

/* Header - Seamless */
.modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 10px 24px;
    /* More top padding */
    border-bottom: none;
    /* No border */
    position: relative;
    background: transparent;
    /* No background */
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    /* Larger title */
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    background: none;
    -webkit-text-fill-color: initial;
}

.modal-close-btn,
.btn-close {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(60, 60, 67, 0.08);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(60, 60, 67, 0.6);
    transition: all 0.2s;
}

.modal-close-btn:hover,
.btn-close:hover {
    background: rgba(60, 60, 67, 0.15);
    color: #000;
    transform: rotate(90deg);
}

/* Scrollable Body - Compact */
.modal-body,
.add-step,
.form-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Fix horizontal scrollbar */
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}

/* Hides scrollbar but allows scrolling */
.modal-body::-webkit-scrollbar,
.add-step::-webkit-scrollbar,
.form-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb,
.add-step::-webkit-scrollbar-thumb,
.form-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Form Elements inside Modal */
.form-group {
    margin: 0;
    /* Gaps handled by flex container */
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #808085;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-group label i {
    color: var(--primary);
    margin-right: 6px;
}

.modal-input,
.glass-input,
.modal-glass input,
.modal-glass textarea {
    width: 100%;
    min-width: 0;
    /* Fix flex/grid overflow */
    box-sizing: border-box !important;
    /* Ensure padding doesn't break width */
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    font-size: 1rem;
    color: #1D1D1F;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-input:focus,
.glass-input:focus,
.modal-glass input:focus,
.modal-glass textarea:focus {
    background: #FFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Footer & Actions - Seamless */
.modal-footer,
.form-actions {
    flex-shrink: 0;
    padding: 10px 24px 24px 24px;
    /* More bottom padding */
    background: transparent;
    /* No background */
    border-top: none;
    /* No border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Overriding old button styles in modal */
.modal-footer .btn,
.form-actions .btn {
    flex: 1;
    /* Make buttons expanded */
    min-width: 100px;
    /* Ensure buttons don't get too small */
    min-height: 44px;
    /* Slightly smaller for mobile */
    font-size: 0.95rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Secondary Button (Cancel/Retour) */
.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #1D1D1F;
    font-weight: 500;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Type Selector Buttons Refined */
.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn:hover {
    background: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.type-btn.active {
    background: #FFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

.type-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* Specific fix for the 'Modifier Activité' scenario which might be using raw classes */
.modal-glass label {
    font-weight: 600;
    color: #86868B;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Clean Section Titles (Replaces dividers) */
.form-divider {
    display: flex;
    align-items: center;
    margin: 30px 0 15px;
    color: var(--text-main);
}

.form-divider::before,
.form-divider::after {
    display: none;
    /* Remove lines */
}

.form-divider span {
    padding: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: none;
    /* Normal case */
    letter-spacing: -0.5px;
    color: var(--text-main);
}

/* Color Picker */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-row input[type="color"] {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-preview {
    flex: 1;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Select Styles */
.glass-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

/* Modal Header Styling */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-color);
    /* Force color to black/dark */
    font-weight: 700;
}

.btn-close {
    background: rgba(0, 0, 0, 0.05);
    /* Light background */
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    /* Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    transform: rotate(90deg);
}

/* Edit Card Button Styling */
.btn-edit-card {
    background: rgba(0, 122, 255, 0.1);
    /* Light Blue Tint */
    color: #007AFF;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-edit-card:hover {
    background: rgba(0, 122, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.15);
}

/* Tabs - Premium Segmented Control */
.tabs-header {
    display: flex;
    background: rgba(118, 118, 128, 0.12);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: none;
    position: relative;
    width: 100%;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8E8E93;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: #FFFFFF;
    color: #000000;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
}

.tab-btn.active::after {
    display: none;
    /* Remove old underline */
}

/* Date Group - Responsive Fix */
.date-group {
    display: flex;
    gap: 16px;
    width: 100%;
}

@media (max-width: 480px) {
    .date-group {
        flex-wrap: wrap;
    }

    .date-group>div {
        flex: 1 1 100%;
        /* Force full width on small screens */
        min-width: 100%;
    }
}

.date-group>div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Redundant block removed - styles merged above */

/* Edit Card Button Positioning Fix */
.btn-edit-card {
    position: relative;
    z-index: 50;
    /* Ensure clickable above card overlay */
}

/* Manage Categories List */
.manage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manage-cat-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.manage-cat-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.manage-cat-item .drag-handle {
    color: #ccc;
    margin-right: 15px;
    cursor: grab;
    transition: color 0.2s;
}

.manage-cat-item:hover .drag-handle {
    color: #999;
}

.cat-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cat-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
}

.cat-actions {
    display: flex;
    gap: 5px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.manage-cat-item:hover .cat-actions {
    opacity: 1;
}

.cat-actions button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cat-actions button:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* --- Admin Panel Styles --- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .admin-grid {
        grid-template-columns: 2fr 1fr;
        /* Main (Users) vs Side (Tools) */
    }
}

/* User List */
.user-list-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.user-list-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-badge {
    font-size: 0.7rem;
    background: #FFD60A;
    color: #000;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

/* Result Box for Passwords */
.result-box {
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.temp-password {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin: 10px 0;
    user-select: all;
    cursor: pointer;
}

.copy-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);

    margin-top: 5px;
}

/* --- NEW MODAL STYLES (Refonte) --- */

/* Segmented Control (iOS Style Tabs) */
.segmented-control {
    background: rgba(118, 118, 128, 0.12);
    border-radius: 9px;
    padding: 2px;
    display: flex;
    margin-bottom: 20px;
}

.segment-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.segment-btn.active {
    background: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

/* Form Spacing Harmony */
.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    /* Espacement label-input */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-body .glass-input {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    /* Cleaner look */
}

.modal-body .glass-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Upload UI */
.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.upload-btn-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.upload-btn-wrapper .btn {
    width: 100%;
    justify-content: center;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.4);
}

.upload-btn-wrapper .btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary);
    color: var(--primary);
}

/* Search Dropdown */
.share-search-box {
    position: relative;
    margin-bottom: 20px;
}

.share-search-box i {
    position: absolute;
    left: 16px;
    /* Ajusted */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 10;
    /* Force on top */
}

.glass-input-clean {
    width: 100%;
    padding: 12px 12px 12px 48px;
    /* Fixed overlap */
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.glass-input-clean:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

/* Premium Trip Card */
.trip-card {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
    cursor: pointer;
}

.trip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}



.trip-cover {
    height: auto;
    aspect-ratio: 1/1;
    /* Square as requested */
    background-size: cover;
    background-position: center;
    position: relative;
}

.trip-card-owned {
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3), 0 8px 15px rgba(0, 0, 0, 0.1);
    /* Stronger Blue Halo */
    border-color: rgba(0, 122, 255, 0.2);
}

.trip-card-shared {
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.1);
    /* Gold Halo Stronger */
    border-color: rgba(255, 215, 0, 0.3);
}

.trip-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.95));
}

.trip-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    text-align: center;
}

/* Date Grid */
/* Date List (Vertical) */
.trip-date-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
    padding: 10px;
    border-radius: 12px;
    margin-top: 4px;
}

.date-row {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-left: 2px;
}

.trip-duration-badge {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.05);
    /* Grey pill */
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
    display: inline-block;
}

.trip-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.user-badge-sm {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    white-space: nowrap;
    /* Prevent wrap */
    max-width: 100%;
}



.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-top: 8px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.1s;
}

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

.search-result-item:hover {
    background: #F2F2F7;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Permissions Toggles */
.active-perm {
    border: 2px solid white !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.1);
}

/* Form Layout Fixes */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row>div {
    flex: 1;
    min-width: 0;
    /* Prevents overflow in flex items */
}

/* Styled Radio Group (Pill Toggle for Image Source) */
.styled-radio-group {
    display: flex;
    background: rgba(118, 118, 128, 0.12);
    padding: 2px;
    border-radius: 8px;
    width: fit-content;
    margin-bottom: 15px;
}

.styled-radio-group label {
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 !important;
    /* Override generic label margin */
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.styled-radio-group input {
    display: none;
}

.styled-radio-group label:has(input:checked) {
    background: white;
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Bottom Actions Redesign */
.form-actions {
    display: flex;
    flex-direction: column;
    /* Stack buttons on mobile modal */
    gap: 12px;
    margin-top: 30px;
}

/* Share List Visibility Fix */
.share-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    min-height: 50px;
    overflow-y: auto;
    /* Scroll if too many users */
    padding-bottom: 10px;
}

.user-list-item {
    background: white;
    /* Ensure contrast against glass */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Fix Modal Overflow generally */
.glass-input {
    width: 100%;
    /* Force width to container */
    max-width: 100%;
}


/* Info Box Small */
.info-box-sm {
    background: rgba(0, 122, 255, 0.08);
    color: var(--primary);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* --- CALCULATOR MODAL (Fixed & Animated) --- */
#converterModal {
    position: fixed;
    bottom: 20px;
    /* Floating margin from bottom */
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    /* Hidden below screen */
    width: calc(100% - 30px);
    /* Side margins (15px each) */
    max-width: 500px;
    background: white;
    /* Fully rounded */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000000 !important;
    /* Highest priority */
    padding: 25px;
    padding-bottom: 25px;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: 'Outfit', sans-serif;
    display: block !important;
    /* Ensure it's not hidden by display property */
}

#converterModal.open {
    transform: translateX(-50%) translateY(0);
    /* Slide up */
}

/* Calculator specific overrides */
.converter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.conv-tab {
    flex: 1;
    background: #f2f2f7;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.conv-tab.active {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
    color: var(--primary);
}

.calc-display {
    background: #f2f2f7;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
}

.calc-display-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 1.2em;
}

.calc-display-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    aspect-ratio: 1/1;
    border: none;
    background: #f2f2f7;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btn:active {
    background: #e5e5ea;
}

.calc-btn.op {
    background: #ff9f0a;
    color: white;
}

.calc-btn.eq {
    background: #ff9f0a;
    color: white;
}

.calc-btn.clear {
    background: #e5e5ea;
    font-weight: 600;
}

/* --- TRIP HUB --- */
.hub-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
}

.hub-card {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hub-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hub-card:active {
    transform: scale(0.97);
}

@media (max-width: 360px) {
    .hub-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Glass Card for Expenses */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: background 0.2s, transform 0.1s;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MODULE DOCS
   ============================================ */

/* Doc Card Preview */
.doc-card-preview {
    width: 100%;
    aspect-ratio: 1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show delete button on hover/touch */
.doc-card:hover .doc-delete-btn,
.doc-card:active .doc-delete-btn {
    opacity: 1 !important;
}

/* Doc card hover */
.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--glass-shadow), 0 8px 25px rgba(0, 0, 0, 0.08) !important;
}

.doc-card:active {
    transform: scale(0.97);
}

/* Category header hover */
.doc-category-header:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
}

/* Toggle Switch for private */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* SortableJS ghost for doc categories */
.doc-category-section .sortable-ghost {
    opacity: 0.4;
}

/* Glass select */
.glass-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2386868b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px !important;
}

/* Fade in animation */
@keyframes docFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.doc-category-section {
    animation: docFadeIn 0.3s ease;
}

/* Btn danger */
.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}

/* Responsive: single column on very small screens */
@media (max-width: 340px) {
    .docs-grid {
        grid-template-columns: 1fr !important;
    }
}