/* ============================================
   SISTEMA DE COLOR ARMONICO - TONOS ORGANICOS
   Basado en escala cromatica con contraste WCAG AA
   ============================================ */
:root {
    color-scheme: dark;

    /* Escala primaria - Azul petroleo (armonia analogica) */
    --color-primary-50: #f0f9ff;
    --color-primary-100: #e0f2fe;
    --color-primary-200: #bae6fd;
    --color-primary-300: #7dd3fc;
    --color-primary-400: #38bdf8;
    --color-primary-500: #0ea5e9;
    --color-primary-600: #0284c7;
    --color-primary-700: #0369a1;
    --color-primary-800: #075985;
    --color-primary-900: #0c4a6e;

    /* Escala secundaria - Indigo (complementaria suave) */
    --color-secondary-50: #eef2ff;
    --color-secondary-100: #e0e7ff;
    --color-secondary-200: #c7d2fe;
    --color-secondary-300: #a5b4fc;
    --color-secondary-400: #818cf8;
    --color-secondary-500: #6366f1;
    --color-secondary-600: #4f46e5;
    --color-secondary-700: #4338ca;
    --color-secondary-800: #3730a3;
    --color-secondary-900: #312e81;

    /* Escala de acento - Teal (armonia triadica) */
    --color-accent-50: #f0fdfa;
    --color-accent-100: #ccfbf1;
    --color-accent-200: #99f6e4;
    --color-accent-300: #5eead4;
    --color-accent-400: #2dd4bf;
    --color-accent-500: #14b8a6;
    --color-accent-600: #0d9488;
    --color-accent-700: #0f766e;
    --color-accent-800: #115e59;
    --color-accent-900: #134e4a;

    /* Escala de advertencia - Ambar (armonia calida) */
    --color-warning-50: #fffbeb;
    --color-warning-100: #fef3c7;
    --color-warning-200: #fde68a;
    --color-warning-300: #fcd34d;
    --color-warning-400: #fbbf24;
    --color-warning-500: #f59e0b;
    --color-warning-600: #d97706;
    --color-warning-700: #b45309;
    --color-warning-800: #92400e;
    --color-warning-900: #78350f;

    /* Escala de error - Rosa coral (armonia complementaria) */
    --color-error-50: #fff1f2;
    --color-error-100: #ffe4e6;
    --color-error-200: #fecdd3;
    --color-error-300: #fda4af;
    --color-error-400: #fb7185;
    --color-error-500: #f43f5e;
    --color-error-600: #e11d48;
    --color-error-700: #be123c;
    --color-error-800: #9f1239;
    --color-error-900: #881337;

    /* Escala de exito - Esmeralda (armonia analoga) */
    --color-success-50: #ecfdf5;
    --color-success-100: #d1fae5;
    --color-success-200: #a7f3d0;
    --color-success-300: #6ee7b7;
    --color-success-400: #34d399;
    --color-success-500: #10b981;
    --color-success-600: #059669;
    --color-success-700: #047857;
    --color-success-800: #065f46;
    --color-success-900: #064e3b;

    /* Escala neutra - Gris pizarra (neutral armonico) */
    --color-neutral-50: #f8fafc;
    --color-neutral-100: #f1f5f9;
    --color-neutral-200: #e2e8f0;
    --color-neutral-300: #cbd5e1;
    --color-neutral-400: #94a3b8;
    --color-neutral-500: #64748b;
    --color-neutral-600: #475569;
    --color-neutral-700: #334155;
    --color-neutral-800: #16161f;
    --color-neutral-900: #0d0d12;

    /* Variables semanticas funcionales - Dark Theme */
    --color-background: var(--color-neutral-900);       /* #0d0d12 */
    --color-surface: rgba(22, 22, 31, 0.95);            /* neutral-800 con opacidad */
    --color-surface-solid: var(--color-neutral-800);    /* #16161f */
    --color-surface-hover: rgba(255, 255, 255, 0.04);
    --color-text-primary: var(--color-neutral-50);
    --color-text-secondary: var(--color-neutral-400);
    --color-text-tertiary: var(--color-neutral-500);
    --color-border: rgba(71, 85, 105, 0.5);
    --color-border-subtle: rgba(71, 85, 105, 0.3);

    /* Variables de accion con contraste garantizado */
    --color-action-primary: var(--color-primary-600);
    --color-action-primary-hover: var(--color-primary-700);
    --color-action-primary-light: rgba(14, 165, 233, 0.15);
    --color-action-secondary: var(--color-neutral-700);
    --color-action-secondary-hover: var(--color-neutral-600);
    --color-action-danger: var(--color-error-500);
    --color-action-danger-hover: var(--color-error-600);
    --color-action-danger-light: rgba(244, 63, 94, 0.15);
    --color-action-success: var(--color-success-500);
    --color-action-success-light: rgba(16, 185, 129, 0.15);

    /* Sombras oscuras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-colored: 0 10px 15px -3px rgba(14, 165, 233, 0.3), 0 4px 6px -4px rgba(14, 165, 233, 0.15);

    /* Efectos */
    --blur-backdrop: saturate(180%) blur(20px);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   GMAIL DARK MODE - BASE & RESET
   ============================================ */
body {
    background-color: var(--color-neutral-900);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.ct-dashboard-container {
    font-family: 'Google Sans', 'Product Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-neutral-900);
    min-height: 100vh;
    padding: 0 24px 24px 280px;
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}


.ct-dashboard-container * {
    box-sizing: border-box;
}

/* ============================================
   SIDEBAR IZQUIERDO - GMAIL STYLE
   ============================================ */
.ct-dock {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 256px;
    max-width: none;
    border: none;
    border-right: 1px solid var(--color-border-subtle);
    border-radius: 0;
    padding: 16px 12px;
    background: var(--color-neutral-900);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 999;
    transform: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.ct-dock-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: flex-start;
    align-items: stretch;
    overflow: visible;
    padding: 0;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ct-dock-inner::-webkit-scrollbar {
    display: none;
}

/* Sidebar menu items - flat Gmail style */
.ct-dock-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 0 16px 16px 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
    text-decoration: none;
    color: var(--color-text-primary);
    width: 100%;
    flex-shrink: 0;
    min-width: auto;
    font-size: 14px;
    font-weight: 500;
    justify-content: flex-start;
    line-height: 1;
}

.ct-dock-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}

.ct-dock-item:active {
    transform: none;
    background: rgba(255, 255, 255, 0.12);
}

/* Active dock item */
.ct-dock-item.active,
.ct-dock-item[aria-current="page"] {
    background: var(--color-action-primary-light);
    color: var(--color-primary-300);
    font-weight: 600;
}

/* Sidebar icons - flat, no background, no shadows */
.ct-dock-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    position: relative;
    overflow: visible;
    background: none !important;
    box-shadow: none !important;
    transition: color 0.15s ease;
}

/* Remove all pseudo-element decorations from icons */
.ct-dock-icon::before,
.ct-dock-icon::after {
    display: none !important;
    content: none !important;
}

.ct-dock-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

/* Override ALL icon color classes - flat Gmail style */
.ct-dock-icon-indigo,
.ct-dock-icon-teal,
.ct-dock-icon-amber,
.ct-dock-icon-slate,
.ct-dock-icon-stone,
.ct-dock-icon-rose,
.ct-dock-icon-emerald,
.ct-dock-icon-violet,
.ct-dock-icon-primary {
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
    color: var(--color-text-secondary);
}

.ct-dock-item:hover .ct-dock-icon {
    color: var(--color-text-primary);
}

.ct-dock-item-primary:hover .ct-dock-icon {
    transform: none;
    box-shadow: none;
}

/* Sidebar labels */
.ct-dock-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
    line-height: 1;
    transition: color 0.15s ease;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ct-dock-item:hover .ct-dock-label {
    color: var(--color-text-primary);
}

/* Badge - Gmail style, right-aligned */
.ct-badge {
    position: static;
    top: auto;
    right: auto;
    background: none;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 600;
    min-width: auto;
    height: auto;
    border-radius: 0;
    display: inline;
    padding: 0;
    box-shadow: none;
    border: none;
    z-index: auto;
    text-shadow: none;
    flex-shrink: 0;
    margin-left: auto;
}

/* Sidebar divider */
.ct-dock-divider {
    width: 100%;
    height: 1px;
    background: var(--color-border-subtle);
    margin: 8px 0;
    flex-shrink: 0;
}

/* Primary button (Compose/Add) - Gmail blue pill */
.ct-dock-item-primary {
    background: var(--color-action-primary) !important;
    color: white !important;
    border-radius: 16px !important;
    height: 56px;
    margin: 0 12px 16px 12px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.025em;
    width: calc(100% - 24px);
    justify-content: center;
    gap: 12px;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.ct-dock-item-primary:hover {
    background: var(--color-action-primary-hover) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(2, 132, 199, 0.3);
    transform: none;
}

.ct-dock-item-primary .ct-dock-icon {
    color: white !important;
    width: 24px;
    height: 24px;
}

.ct-dock-item-primary .ct-dock-icon svg {
    width: 24px;
    height: 24px;
}

.ct-dock-item-primary .ct-dock-label {
    color: white;
    font-weight: 600;
    flex: none;
}

/* Logout/Login links in sidebar */
.ct-dock-item-logout,
.ct-dock-item-login {
    color: var(--color-text-tertiary);
    font-size: 13px;
    margin-top: 8px;
}

.ct-dock-item-logout:hover {
    color: var(--color-error-400);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.ct-main-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   TOOLBAR - GMAIL STYLE
   ============================================ */
.ct-toolbar {
    margin-bottom: 0;
    padding: 8px 0;
}

.ct-toolbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ct-toolbar-title h1 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: normal;
    margin: 0 0 2px 0;
    color: var(--color-text-primary);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.ct-subtitle {
    font-size: 13px;
    color: var(--color-text-tertiary);
    font-weight: 400;
}

/* ============================================
   SELECTION CONTROLS - GMAIL TOOLBAR STYLE
   ============================================ */
.ct-selection-controls {
    margin-top: 0;
    margin-bottom: 0;
}

.ct-selection-bar {
    background: var(--color-neutral-900);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: 1px solid var(--color-border-subtle);
    border-radius: 0;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    box-shadow: none;
    min-height: 48px;
}

.ct-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    color: var(--color-text-secondary);
}

.ct-checkbox-label input {
    display: none;
}

.ct-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-neutral-500);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: transparent;
}

.ct-checkbox-label:hover .ct-checkmark {
    border-color: var(--color-neutral-300);
}

.ct-checkbox-label input:checked + .ct-checkmark {
    background: var(--color-action-primary);
    border-color: var(--color-action-primary);
}

.ct-checkbox-label input:checked + .ct-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.ct-selection-count-wrapper {
    font-size: 13px;
    color: var(--color-text-tertiary);
    font-weight: 500;
    padding: 0 8px;
}

.ct-selection-count {
    color: var(--color-primary-300);
    font-weight: 600;
}

.ct-selection-actions {
    display: flex;
    gap: 2px;
    margin-left: auto;
    flex-wrap: nowrap;
}


/* ============================================
   SEARCH BAR - GMAIL PILL STYLE
   ============================================ */
.ct-search-container {
    margin-bottom: 8px;
}

/* Wrapper is now the pill — flex row with icon | input */
.ct-search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
    background: var(--color-neutral-800);
    border-radius: 24px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ct-search-wrapper:focus-within {
    background: var(--color-neutral-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ct-search-input {
    flex: 1;
    padding: 12px 16px 12px 0;
    border: none;
    background: transparent;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 400;
    outline: none;
    min-width: 0;
}

.ct-search-input::placeholder {
    color: var(--color-neutral-400);
}

/* Icon is now an inline flex item — always to the left of the text */
.ct-search-icon {
    order: -1;           /* visually first even though it's last in DOM */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 20px;
    height: 20px;
    color: var(--color-neutral-400);
    pointer-events: none;
    transition: color 0.2s ease;
}

.ct-search-wrapper:focus-within .ct-search-icon {
    color: var(--color-primary-400);
}

/* ============================================
   BUTTONS - GMAIL FLAT STYLE
   ============================================ */
.ct-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    border: none;
    outline: none;
    font-family: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Remove gradient overlay from all buttons */
.ct-btn::before {
    display: none;
}

.ct-btn-primary {
    background: var(--color-action-primary);
    color: white;
    border: none;
    box-shadow: none;
}

.ct-btn-primary:hover {
    background: var(--color-action-primary-hover);
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ct-btn-secondary {
    background: transparent;
    color: var(--color-primary-400);
    border: 1px solid var(--color-neutral-600);
    box-shadow: none;
}

.ct-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: none;
    border-color: var(--color-neutral-500);
}

.ct-btn-danger {
    background: transparent;
    color: var(--color-error-400);
    border: 1px solid var(--color-error-700);
    box-shadow: none;
}

.ct-btn-danger:hover {
    background: var(--color-action-danger-light);
    transform: none;
    border-color: var(--color-error-600);
}

.ct-btn-icon-sm {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.ct-btn-icon-sm:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
}

.ct-selection-bar .ct-btn-icon-sm {
    color: var(--color-neutral-400);
}

.ct-selection-bar .ct-btn-icon-sm:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-neutral-100);
}

.ct-btn-icon-danger:hover {
    background: var(--color-action-danger-light);
    color: var(--color-action-danger);
}

.ct-button-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-tertiary);
    transition: background 0.15s ease, color 0.15s ease;
    opacity: 1;
}

.ct-button-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-error-400);
}

.ct-button-icon svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   EMAIL LIST ROWS - GMAIL STYLE
   ============================================ */
.ct-project-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Each card = one Gmail row */
.ct-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: 1px solid var(--color-border-subtle);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: background 0.1s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 50px;
    cursor: pointer;
}

/* Remove gradient pseudo-element */
.ct-card::before {
    display: none;
}

.ct-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-border-subtle);
    background: rgba(255, 255, 255, 0.04);
}

.ct-card-selected {
    background: rgba(14, 165, 233, 0.08) !important;
    border-color: var(--color-border-subtle);
    box-shadow: none;
}

/* Card header - inline with everything */
.ct-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 0 8px 0 12px;
    height: 100%;
}

.ct-select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-action-primary);
    flex-shrink: 0;
    touch-action: manipulation;
}

.ct-select-checkbox:focus {
    outline: none;
}

.ct-select-checkbox:focus-visible {
    outline: 2px solid var(--color-action-primary);
    outline-offset: 2px;
}

/* Card icon - small, flat, no background */
.ct-card-icon {
    width: 20px;
    height: 20px;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    box-shadow: none;
}

.ct-card-icon svg {
    width: 18px;
    height: 18px;
}

/* Card title - inline, truncated */
.ct-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 280px;
    overflow: hidden;
}

.ct-card-title a,
.ct-card-title-btn {
    all: unset;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s ease;
    box-sizing: border-box;
}

.ct-card-title a:hover,
.ct-card-title-btn:hover {
    color: var(--color-primary-300);
}

/* Card body - inline preview text */
.ct-card-body {
    margin-bottom: 0;
    padding-left: 0;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

.ct-card-url {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.ct-card-url-btn {
    display: inline;
    align-items: center;
    gap: 0;
    padding: 0;
    background: none;
    color: var(--color-text-tertiary);
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
    cursor: pointer;
    flex-shrink: 1;
    min-width: 0;
}

.ct-card-url-btn::before {
    content: "\2002\2014\2002";
    color: var(--color-text-tertiary);
}

.ct-card-url-btn:hover {
    color: var(--color-primary-300);
    background: none;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

/* Card link reveal - expands below the row */
.ct-card-link-reveal {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 16px;
    margin: 0;
    background: var(--color-neutral-800);
    border: 1px solid var(--color-border-subtle);
    border-top: none;
    animation: revealSlide 0.2s ease;
    z-index: 10;
    overflow: hidden;
}

@keyframes revealSlide {
    from { opacity: 0; max-height: 0; padding: 0 16px; }
    to   { opacity: 1; max-height: 60px; padding: 10px 16px; }
}

.ct-card-link-go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--color-neutral-700);
    color: var(--color-primary-300);
    border: 1px solid var(--color-neutral-600);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    transition: background 0.15s ease;
}

.ct-card-link-go:hover {
    background: var(--color-neutral-600);
    color: var(--color-primary-200);
    border-color: var(--color-neutral-500);
    transform: none;
    box-shadow: none;
}

/* Card footer - date on the right */
.ct-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px 0 0;
    border-top: none;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    gap: 4px;
    height: 100%;
}

.ct-card-date {
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-weight: 400;
    white-space: nowrap;
}

/* Card actions - always visible */
.ct-card-actions {
    display: flex;
    gap: 0;
    opacity: 1;
}

/* Received items - subtle blue left border */
.ct-card-received {
    background: transparent;
    border-left: 2px solid var(--color-primary-500);
    color: var(--color-neutral-50);
    box-shadow: none;
}

.ct-card-received:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ct-card-received .ct-card-icon {
    background: none;
    color: var(--color-primary-400);
}

.ct-card-received .ct-card-title a,
.ct-card-received .ct-card-title-btn {
    color: var(--color-neutral-50);
}

.ct-card-received .ct-card-title a:hover,
.ct-card-received .ct-card-title-btn:hover {
    color: var(--color-primary-300);
}

.ct-card-received .ct-card-url,
.ct-card-received .ct-card-url-btn {
    color: var(--color-text-tertiary);
}

.ct-card-received .ct-card-date {
    color: var(--color-text-tertiary);
}

.ct-card-received .ct-button-icon {
    color: var(--color-text-tertiary);
}

.ct-card-received .ct-button-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-error-400);
}

/* Task badge */
.ct-task-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--color-action-primary-light);
    color: var(--color-primary-300);
}

/* ============================================
   MODALS - CLEAN DARK STYLE
   ============================================ */
.ct-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ct-modal-content {
    background: var(--color-neutral-800);
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.25s ease;
    display: flex;
    flex-direction: column;
}

.ct-modal-wide {
    max-width: 760px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ct-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-subtle);
    background: var(--color-neutral-800);
}

.ct-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.ct-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.ct-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    transform: none;
}

.ct-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   FORMS - CLEAN GMAIL STYLE
   ============================================ */
.ct-form-group {
    margin-bottom: 20px;
}

.ct-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ct-form-group input,
.ct-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-neutral-600);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: var(--color-neutral-900);
    color: var(--color-neutral-50);
    transition: border-color 0.15s ease;
}

.ct-modal input:not(.ct-search-input):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.ct-modal textarea,
.ct-modal select {
    background: var(--color-neutral-900);
    color: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-600);
}

.ct-modal input:not(.ct-search-input)::placeholder,
.ct-modal textarea::placeholder {
    color: var(--color-neutral-400);
}

.ct-modal input:not(.ct-search-input):focus,
.ct-modal textarea:focus,
.ct-modal select:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: none;
    background: var(--color-neutral-900);
}

select.ct-form-select {
    background-color: var(--color-neutral-900) !important;
    color: #ffffff !important;
    border-color: var(--color-neutral-600) !important;
}

select.ct-form-select option {
    background-color: var(--color-neutral-800);
    color: #ffffff;
}

.ct-form-group input:focus,
.ct-form-group select:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: none;
    background: var(--color-neutral-900);
}

select.ct-form-select:focus {
    background-color: var(--color-neutral-900) !important;
    border-color: var(--color-primary-500) !important;
}

.ct-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-subtle);
}

.ct-search-box {
    display: flex;
    gap: 8px;
}

.ct-search-box input {
    flex: 1;
}

/* ============================================
   SHARE SECTIONS
   ============================================ */
.ct-share-section {
    margin-bottom: 24px;
}

.ct-section-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ct-saved-users-grid {
    display: grid;
    gap: 4px;
}

.ct-saved-user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.ct-saved-user-chip:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.04);
    transform: none;
}

.ct-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-secondary-700);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: none;
    text-shadow: none;
}

.ct-user-info {
    flex: 1;
    min-width: 0;
}

.ct-user-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.ct-user-email {
    display: block;
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-weight: 400;
}

.ct-shared-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 40px;
    padding: 8px;
    background: var(--color-neutral-900);
    border: 1px solid var(--color-neutral-700);
    border-radius: 4px;
}

.ct-shared-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--color-neutral-700);
    color: var(--color-text-primary);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    animation: popIn 0.2s ease;
    box-shadow: none;
    text-shadow: none;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ct-remove-chip {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    margin-left: 0;
}

.ct-remove-chip:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-error-400);
    transform: none;
}

.ct-empty-text {
    color: var(--color-text-tertiary);
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
}

.ct-status-msg {
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
    font-weight: 500;
}

.ct-status-msg.success { color: var(--color-success-500); }
.ct-status-msg.error { color: var(--color-error-500); }

/* ============================================
   FOLDERS GRID
   ============================================ */
.ct-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.ct-folder-card {
    background: transparent;
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.ct-folder-card::before {
    display: none;
}

.ct-folder-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-neutral-600);
    background: rgba(255, 255, 255, 0.04);
}

.ct-folder-icon-lg {
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin: 0;
    color: var(--color-primary-400);
    filter: none;
    transition: color 0.15s ease;
}

.ct-folder-card:hover .ct-folder-icon-lg {
    transform: none;
    color: var(--color-primary-300);
}

.ct-folder-icon-lg svg {
    width: 100%;
    height: 100%;
}

.ct-folder-info {
    flex: 1;
    min-width: 0;
}

.ct-folder-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct-folder-count {
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-weight: 400;
}

/* Wrapper for share + delete actions on folder cards */
.ct-folder-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.ct-folder-share-btn {
    color: var(--color-secondary-400, #818cf8);
    opacity: 0.5;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ct-folder-share-btn:hover {
    opacity: 1;
    background: rgba(99, 102, 241, 0.12);
    color: var(--color-secondary-300, #a5b4fc);
}

.ct-folder-delete-form {
    margin-left: 0;
    flex-shrink: 0;
}

.ct-folder-delete-form .ct-btn-icon-sm {
    color: var(--color-error-400, #f87171);
    opacity: 0.55;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.ct-folder-delete-form .ct-btn-icon-sm:hover {
    opacity: 1;
    background: var(--color-action-danger-light, rgba(239,68,68,0.12));
    color: var(--color-action-danger, #ef4444);
}

/* Carpetas en la bandeja de entrada */
.ct-inbox-folders-section {
    margin-bottom: 8px;
}

.ct-inbox-folders-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* Toggle vista carpetas */
#ct-folders-view-toggle {
    display: none;
    align-items: center;
    gap: 4px;
}

.ct-view-toggle-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ct-view-toggle-btn:hover {
    color: var(--color-text-secondary);
    background: var(--color-surface-hover);
}

.ct-view-toggle-btn.active {
    color: var(--color-primary-400, #60a5fa);
    border-color: var(--color-primary-400, #60a5fa);
    background: rgba(96, 165, 250, 0.1);
}

/* Vista cuadrícula para cards */
#ct-uncategorized-cards.ct-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 12px 0;
}

#ct-uncategorized-cards.ct-grid-view .ct-card {
    height: auto;
    min-height: 120px;
    border-bottom: none;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: 0;
    position: relative;
}

#ct-uncategorized-cards.ct-grid-view .ct-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-md);
}

#ct-uncategorized-cards.ct-grid-view .ct-card-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    height: auto;
    padding: 16px;
}

#ct-uncategorized-cards.ct-grid-view .ct-card-title {
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

#ct-uncategorized-cards.ct-grid-view .ct-card-preview {
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

#ct-uncategorized-cards.ct-grid-view .ct-card-preview::before {
    content: none;
}

#ct-uncategorized-cards.ct-grid-view .ct-card-date {
    margin-top: 4px;
}

#ct-uncategorized-cards.ct-grid-view .ct-card-row .ct-card-actions {
    opacity: 1;
    margin-top: 4px;
}

/* ============================================
   EMPTY STATES & LOADING
   ============================================ */
.ct-empty-state-modal {
    text-align: center;
    padding: 48px 24px;
}

.ct-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
    filter: none;
}

.ct-empty-state-modal h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.ct-empty-state-modal p {
    margin: 0;
    color: var(--color-text-tertiary);
    font-size: 14px;
    font-weight: 400;
}

.ct-guest-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(120, 53, 15, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    margin-bottom: 16px;
    color: var(--color-neutral-50);
    font-size: 14px;
    font-weight: 400;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.ct-guest-banner a {
    color: var(--color-warning-300) !important;
}

.ct-guest-banner svg {
    color: var(--color-warning-500);
    flex-shrink: 0;
}

.ct-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px;
}

.ct-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border-subtle);
    border-top-color: var(--color-action-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ct-description-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.ct-search-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 14px;
    border: 1px solid var(--color-neutral-600);
    border-radius: 4px;
    background: var(--color-neutral-900);
    transition: border-color 0.15s ease;
}

.ct-search-filter:focus-within {
    border-color: var(--color-primary-500);
}

.ct-search-filter input {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #ffffff !important;
    outline: none;
    min-width: 0;
}

.ct-search-filter svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--color-neutral-400);
    pointer-events: none;
}

.ct-admin-data-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ============================================
   SCROLLBAR - THIN GMAIL STYLE
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-600);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

/* Text selection */
::selection {
    background: var(--color-primary-700);
    color: var(--color-neutral-50);
}

/* ============================================
   RESPONSIVE - DESKTOP (>1024px)
   ============================================ */
/* Default is desktop: sidebar 256px + content */

/* ============================================
   RESPONSIVE - TABLET (768-1024px)
   ============================================ */
@media (max-width: 1024px) {
    .ct-dock {
        width: 72px;
        padding: 12px 8px;
        align-items: center;
    }

    .ct-dock-item {
        justify-content: center;
        padding: 0;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        gap: 0;
    }

    .ct-dock-label {
        display: none;
    }

    .ct-badge {
        position: absolute;
        top: 2px;
        right: 2px;
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        padding: 0 4px;
        background: var(--color-error-600);
        margin-left: 0;
    }

    .ct-dock-divider {
        width: 32px;
    }

    .ct-dock-item-primary {
        width: 48px !important;
        height: 48px;
        padding: 0;
        margin: 0 0 12px 0;
        border-radius: 50% !important;
        justify-content: center;
    }

    .ct-dock-item-primary .ct-dock-label {
        display: none;
    }

    .ct-dashboard-container {
        padding-left: calc(72px + 16px);
        padding-right: 16px;
        padding-top: 16px;
        padding-bottom: 24px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {
    /* ── Dock bar: solo muestra el botón Menú ── */
    .ct-dock {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        border: none;
        border-top: 1px solid var(--color-border-subtle);
        border-right: none;
        border-radius: 0;
        padding: 0;
        flex-direction: row;
        overflow: visible;
        align-items: stretch;
        z-index: 1002;
    }

    .ct-dock::after {
        display: none;
    }

    /* ── Bottom sheet: panel con todos los ítems ── */
    .ct-dock-inner {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        justify-content: flex-start;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 85dvh;
        width: 100%;
        background: var(--color-surface, #1c1c2a);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
        padding: 0 0 env(safe-area-inset-bottom, 20px);
        transform: translateY(110%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1003;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ct-dock-inner::-webkit-scrollbar {
        display: none;
    }

    /* Pastilla handle en la parte superior del sheet */
    .ct-dock-inner::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.18);
        border-radius: 2px;
        margin: 10px auto 6px;
        flex-shrink: 0;
    }

    .ct-dock.ct-dock-open .ct-dock-inner {
        transform: translateY(0);
    }

    /* ── Ítems: estilo Material list row ── */
    .ct-dock-item {
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-start;
        padding: 0 20px;
        min-height: 60px;
        width: 100%;
        gap: 18px;
        border-radius: 0;
        min-width: 0;
        flex: 0 0 auto;
        position: relative;
    }

    .ct-dock-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .ct-dock-icon svg {
        width: 24px;
        height: 24px;
    }

    .ct-dock-label {
        display: block;
        font-size: 15px;
        font-weight: 500;
        color: var(--color-text-primary);
        text-align: left;
        flex: 1;
        white-space: nowrap;
    }

    .ct-dock-divider {
        display: block;
        margin: 4px 0;
    }

    .ct-badge {
        position: static;
        margin-left: auto;
        font-size: 11px;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        padding: 0 5px;
        background: var(--color-error-600);
        flex-shrink: 0;
    }

    .ct-dock-item-primary {
        background: transparent !important;
        border-radius: 0 !important;
        width: 100% !important;
        min-height: 60px;
        padding: 0 20px;
    }

    .ct-dock-item-primary .ct-dock-icon {
        color: var(--color-primary-400) !important;
    }

    .ct-dock-item-primary .ct-dock-label {
        display: block;
        color: var(--color-primary-400);
        font-size: 15px;
        font-weight: 500;
        text-align: left;
    }

    /* ── Botón toggle Menú ── */
    .ct-dock-menu-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        width: 100%;
        min-height: 56px;
        border: none;
        background: transparent;
        color: var(--color-text-secondary);
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        padding: 8px 16px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .ct-dock.ct-dock-open .ct-dock-menu-btn {
        color: var(--color-action-primary, #6366f1);
    }

    .ct-dock-menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
    }

    .ct-dock-menu-btn-label {
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .ct-dashboard-container {
        padding-left: 8px;
        padding-right: 8px;
        padding-top: 12px;
        padding-bottom: 84px; /* clear the fixed bottom nav */
        min-height: 100vh;
    }

    .ct-toolbar-title h1 {
        font-size: 18px;
    }

    /* Barra de selección en móvil — dos filas */
    .ct-selection-bar {
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 4px;
        row-gap: 0;
    }

    .ct-selection-count-wrapper {
        flex: 1;
    }

    /* Acciones siempre visibles, segunda fila */
    .ct-selection-actions {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 6px;
        margin-top: 2px;
        border-top: 1px solid var(--color-border-subtle);
    }

    /* Botones y formularios: todos al mismo nivel en el wrap */
    .ct-selection-actions .ct-btn,
    .ct-selection-actions form {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ct-selection-actions .ct-btn {
        justify-content: center;
        font-size: 12px;
        padding: 8px 8px;
    }

    /* El botón dentro del form ocupa todo el ancho del form */
    .ct-selection-actions form .ct-btn {
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 8px 8px;
    }

    .ct-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Cards become slightly taller on mobile for tap targets */
    .ct-card {
        height: auto;
        min-height: 52px;
        padding: 8px 0;
        flex-wrap: wrap;
    }

    .ct-card-header {
        padding: 0 8px;
    }

    .ct-card-title {
        max-width: none;
        font-size: 13px;
    }

    /* "Añadir producto": oculto por defecto en móvil; el JS lo muestra al abrir una lista */
    #ct-folder-add-product-btn {
        display: none;
        font-size: 13px;
        padding: 8px 12px;
    }

    /* Prevent toolbar title from overflowing */
    .ct-toolbar-title {
        flex-wrap: nowrap;
        min-width: 0;
        flex: 1;
    }

    .ct-toolbar-title h1 {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1;
    }

    /* Hide view toggle on mobile (saves toolbar space) */
    #ct-folders-view-toggle {
        display: none !important;
    }

    .ct-card-body {
        display: none;
    }

    .ct-card-footer {
        padding-right: 8px;
    }

    .ct-card-date {
        font-size: 11px;
    }

    .ct-folders-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ct-folder-card {
        padding: 12px;
    }

    .ct-folder-icon-lg {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }

    .ct-modal {
        padding: 0;
        align-items: flex-end;
    }

    .ct-modal-content {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        animation: slideUpMobile 0.25s ease;
    }

    @keyframes slideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .ct-modal-header {
        padding: 16px 20px;
    }

    .ct-modal-body {
        padding: 20px;
    }

    .ct-form-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .ct-form-actions .ct-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   GMAIL ADDITIONS - LOGO, COMPOSE, SEARCH, ROW
   ============================================ */

/* ── Dock menu toggle: oculto en desktop/tablet ── */
@media (min-width: 769px) {
    .ct-dock-menu-btn {
        display: none !important;
    }
}

/* Swap de iconos hamburger ↔ X (aplica a todos los tamaños, la lógica es por clase) */
.ct-menu-icon-close {
    display: none;
}

.ct-dock.ct-dock-open .ct-menu-icon-open {
    display: none;
}

.ct-dock.ct-dock-open .ct-menu-icon-close {
    display: block;
}

/* Backdrop del menú móvil */
.ct-dock-bdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1001;
    pointer-events: none;
    transition: background 0.28s ease;
}

.ct-dock-bdrop.ct-dock-bdrop-visible {
    background: rgba(0, 0, 0, 0.52);
    pointer-events: all;
}

/* Sidebar logo */
.ct-dock-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 16px;
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.ct-dock-logo svg {
    flex-shrink: 0;
}

/* Compose button - Gmail blue pill at top of sidebar */
.ct-dock-compose-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: calc(100% - 24px);
    margin: 0 12px 16px;
    padding: 0 24px;
    height: 56px;
    background: var(--color-action-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    letter-spacing: 0.025em;
}

.ct-dock-compose-btn:hover {
    background: var(--color-action-primary-hover);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(2, 132, 199, 0.3);
}

.ct-dock-compose-btn svg {
    flex-shrink: 0;
}

/* Overlay de carga centrado */
#ct-loading-bar {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#ct-loading-bar.ct-loading-active {
    opacity: 1;
    pointer-events: all;
}

#ct-loading-bar .ct-loading-card {
    background: var(--color-neutral-800);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 240px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

#ct-loading-bar .ct-loading-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
}

#ct-loading-bar .ct-loading-track {
    width: 100%;
    height: 4px;
    background: var(--color-neutral-700, rgba(255,255,255,0.1));
    border-radius: 99px;
    overflow: hidden;
}

#ct-loading-bar .ct-loading-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(to right, var(--color-primary-400, #38bdf8), var(--color-accent-400, #2dd4bf));
    box-shadow: 0 0 8px rgba(56,189,248,0.5);
}


/* Gmail-style top search bar */
.ct-gmail-searchbar {
    padding: 8px 0 12px;
    display: flex;
    justify-content: center;
}

/* Wrapper is the pill — flex row with icon | input */
.ct-gmail-search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 720px;
    padding: 0 16px;
    background: var(--color-neutral-800);
    border-radius: 24px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ct-gmail-search-wrapper:focus-within {
    background: var(--color-neutral-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ct-gmail-search-field {
    flex: 1;
    padding: 12px 16px 12px 0;
    border: none;
    background: transparent;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 400;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.ct-gmail-search-field::placeholder {
    color: var(--color-neutral-500);
}

/* Icon is an inline flex item — never overlaps the text */
.ct-gmail-search-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-neutral-400);
    pointer-events: none;
    transition: color 0.2s ease;
}

.ct-gmail-search-wrapper:focus-within .ct-gmail-search-icon {
    color: var(--color-primary-400);
}

/* Clear (X) button inside search bar */
.ct-search-clear-btn {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--color-text-tertiary);
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    margin-right: 4px;
    transition: background 0.15s, color 0.15s;
}
.ct-search-clear-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-text-primary);
}
.ct-gmail-search-wrapper.ct-search-has-value .ct-search-clear-btn {
    display: flex;
}

/* Back button for folder view */
.ct-btn-icon-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.ct-btn-icon-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
}

/* Card row - single horizontal line like Gmail email row */
.ct-card-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 0 16px 0 12px;
    min-width: 0;
}

/* Card preview text (URL host) */
.ct-card-preview {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-tertiary);
}

.ct-card-preview::before {
    content: "\2002\2014\2002";
    color: var(--color-neutral-600);
}

/* Task badge inline */
.ct-card-row .ct-task-badge {
    flex-shrink: 0;
}

/* Card actions inline in row */
.ct-card-row .ct-card-actions {
    display: flex;
    gap: 0;
    opacity: 1;
    flex-shrink: 0;
}

.ct-card-row .ct-button-icon {
    opacity: 1;
}

/* Card date in row */
.ct-card-row .ct-card-date {
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 48px;
    text-align: right;
}

/* Responsive for new elements */
@media (max-width: 768px) {
    .ct-dock-logo {
        display: none;
    }

    .ct-dock-compose-btn {
        display: none;
    }

    #ct-mobile-fab {
        display: flex;
    }

    .ct-gmail-searchbar {
        padding: 8px 0;
    }

    .ct-gmail-search-wrapper {
        border-radius: 8px;
    }

    .ct-gmail-search-field {
        font-size: 14px;
        padding: 10px 12px 10px 0;
    }

    .ct-card-row {
        padding: 0 8px;
        gap: 8px;
    }

    .ct-card-preview {
        display: none;
    }

    .ct-card-folder .ct-card-preview {
        display: block;
        font-size: 11px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .ct-card-row .ct-card-date {
        font-size: 11px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ct-dock-logo span {
        display: none;
    }

    .ct-dock-compose-btn span {
        display: none;
    }

    .ct-dock-compose-btn {
        width: 48px;
        height: 48px;
        margin: 4px auto 12px;
        padding: 0;
        border-radius: 16px;
    }
}

/* ============================================
   LISTA DE LA COMPRA - ESTILOS ESPECÍFICOS
   ============================================ */

/* Tarjeta de artículo: info combinada */
.ct-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ct-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ct-meta-item {
    font-size: 12px;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

.ct-meta-cantidad::before { content: '×'; margin-right: 2px; }
.ct-meta-precio {
    color: var(--color-success-400, #4ade80);
    font-weight: 600;
}
.ct-meta-tienda::before { content: '🏪 '; }

/* Artículo comprado */
.ct-card-bought {
    opacity: 0.6;
}

.ct-title-bought {
    text-decoration: line-through;
    color: var(--color-text-tertiary) !important;
}

/* Botón de marcar como comprado */
.ct-bought-toggle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: transparent;
    color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    padding: 0;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: none) {
    .ct-bought-toggle:active {
        background: transparent;
        border-color: var(--color-border);
        color: transparent;
    }

    .ct-bought-toggle.ct-bought-active:active {
        background: var(--color-success-500, #22c55e);
        border-color: var(--color-success-500, #22c55e);
        color: #fff;
    }
}

.ct-bought-toggle:focus {
    outline: none;
}

.ct-bought-toggle:focus-visible {
    outline: 2px solid var(--color-action-primary);
    outline-offset: 2px;
}

/* Estado activo: siempre visible independientemente del dispositivo */
.ct-bought-toggle.ct-bought-active {
    border-color: var(--color-success-500, #22c55e);
    background: var(--color-success-500, #22c55e);
    color: #fff;
}

/* Hover: solo en dispositivos con puntero real (no táctiles) */
@media (hover: hover) {
    .ct-bought-toggle:hover {
        border-color: var(--color-success-500, #22c55e);
        background: rgba(34, 197, 94, 0.15);
        color: var(--color-success-500, #22c55e);
    }

    .ct-bought-toggle.ct-bought-active:hover {
        background: var(--color-success-600, #16a34a);
    }
}

/* Barra de progreso en tarjeta de lista (inline) */
.ct-folder-inline-progress {
    height: 3px;
    background: var(--color-border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
    width: 100%;
}

.ct-folder-inline-bar {
    height: 100%;
    background: var(--color-success-500, #22c55e);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Barra de progreso en modal de listas */
.ct-folder-progress {
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
    width: 100%;
}

.ct-folder-progress-bar {
    height: 100%;
    background: var(--color-success-500, #22c55e);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ============================================
   MOBILE FAB (Floating Action Button)
   ============================================ */
#ct-mobile-fab {
    display: none;
    position: fixed;
    bottom: 72px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-action-primary, #0284c7);
    color: #fff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

#ct-mobile-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0,0,0,0.55);
}

#ct-mobile-fab:active {
    transform: scale(0.95);
}

/* Ajuste del ct-card-title cuando está dentro de ct-card-info */
.ct-card-info .ct-card-title {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-primary);
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

/* Etiquetas de acción — ocultas en escritorio */
.ct-action-label {
    display: none;
}

/* Botón acordeón — oculto en escritorio */
.ct-expand-btn {
    display: none;
}

/* Móvil: acordeón tipo Android */
@media (max-width: 768px) {

    /* Altura automática para permitir expansión */
    .ct-card {
        height: auto;
        min-height: 50px;
    }

    /* La fila envuelve para que los botones caigan debajo */
    .ct-card-row {
        flex-wrap: wrap;
        align-items: center;
        padding: 0 8px;
        gap: 8px;
    }

    /* Ocultar fecha en móvil */
    .ct-card-row > .ct-card-date {
        display: none;
    }

    /* Título: hasta 2 líneas */
    .ct-card-info .ct-card-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Área de info clicable */
    .ct-card-info {
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Botón acordeón visible en móvil */
    .ct-expand-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border: none;
        background: transparent;
        color: var(--color-text-tertiary);
        cursor: pointer;
        border-radius: 50%;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        -webkit-appearance: none;
        appearance: none;
    }

    .ct-expand-btn svg {
        transition: transform 0.22s ease;
    }

    .ct-card.ct-expanded .ct-expand-btn svg {
        transform: rotate(180deg);
    }

    /* Panel de acciones — oculto por defecto */
    .ct-card-actions {
        order: 10;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        gap: 0;
        border-top: 1px solid transparent;
        transition: max-height 0.25s ease, padding 0.22s ease, border-color 0.2s ease;
    }

    /* Estado expandido */
    .ct-card.ct-expanded .ct-card-actions {
        max-height: 80px;
        padding: 6px 4px 8px;
        border-top-color: var(--color-border-subtle);
    }

    /* Botones de acción: columna con icono + etiqueta */
    .ct-card-actions .ct-button-icon,
    .ct-card-actions .ct-delete-form .ct-button-icon {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: auto;
        height: 58px;
        padding: 8px 4px;
        border-radius: 10px;
        font-size: 11px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .ct-card-actions .ct-button-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Etiquetas visibles en móvil */
    .ct-card-actions .ct-action-label {
        display: block;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.01em;
        color: inherit;
        line-height: 1;
    }

    /* Botón borrar — color rojo */
    .ct-card-actions .ct-btn-delete {
        color: var(--color-error-400, #f87171);
    }

    .ct-card-actions .ct-btn-delete:active {
        background: rgba(248, 113, 113, 0.12);
    }

    /* El form de borrar ocupa igual que los botones */
    .ct-card-actions .ct-delete-form {
        flex: 1;
        display: flex;
    }

    /* Hover solo en escritorio */
    .ct-card-actions .ct-button-icon:hover {
        background: transparent;
        color: inherit;
    }

    /* Active state para feedback táctil */
    .ct-card-actions .ct-button-icon:active {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ============================================
   MODAL DE LISTA — Material Design (Android)
   ============================================ */

.ct-folder-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ct-folder-modal-overlay.ct-folder-modal-open {
    pointer-events: all;
    opacity: 1;
}

/* Panel: surface elevado sobre el bg */
.ct-folder-modal-panel {
    width: 100%;
    height: 100dvh;
    background: var(--color-surface, #1c1c2a);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ct-folder-modal-overlay.ct-folder-modal-open .ct-folder-modal-panel {
    transform: translateY(0);
}

/* En escritorio: modal centrado */
@media (min-width: 769px) {
    .ct-folder-modal-overlay {
        background: rgba(0, 0, 0, 0.6);
        align-items: center;
        justify-content: center;
    }

    .ct-folder-modal-panel {
        width: 90%;
        max-width: 600px;
        height: 85vh;
        border-radius: 20px;
        transform: scale(0.94) translateY(12px);
        box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
        overflow: hidden;
    }

    .ct-folder-modal-overlay.ct-folder-modal-open .ct-folder-modal-panel {
        transform: scale(1) translateY(0);
    }
}

/* ── Top App Bar ── */
.ct-folder-modal-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px 0 4px;
    height: 64px;
    min-height: 64px;
    flex-shrink: 0;
    background: var(--color-surface, #1c1c2a);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
    position: relative;
    z-index: 1;
}

/* Botones de la top bar */
.ct-folder-modal-back,
.ct-folder-modal-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    overflow: visible;
    transition: background 0.12s;
}

.ct-folder-modal-back {
    color: var(--color-text-primary);
}

.ct-folder-modal-back:active {
    background: rgba(255, 255, 255, 0.1);
}

@media (hover: hover) {
    .ct-folder-modal-back:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

/* Botón añadir: tonal filled button Android */
.ct-folder-modal-add {
    width: 44px;
    height: 44px;
    margin-left: auto;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.18);
    color: var(--color-action-primary, #6366f1);
}

.ct-folder-modal-add:active {
    background: rgba(99, 102, 241, 0.32);
}

@media (hover: hover) {
    .ct-folder-modal-add:hover {
        background: rgba(99, 102, 241, 0.26);
    }
}

/* Grupo título */
.ct-folder-modal-title-group {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 4px;
}

.ct-folder-modal-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.ct-folder-modal-subtitle {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    opacity: 0.8;
}

/* ── Barra de selección múltiple dentro del modal ── */
.ct-folder-modal-sel {
    flex-shrink: 0;
    border-bottom: 1px solid var(--color-border-subtle, rgba(255,255,255,0.08));
    background: rgba(99, 102, 241, 0.07);
}

.ct-folder-modal-sel .ct-selection-bar {
    background: transparent;
    border: none;
    border-bottom: none;
    padding: 6px 12px;
    min-height: 48px;
    flex-wrap: wrap;
    gap: 6px;
}

.ct-folder-modal-sel .ct-selection-actions {
    gap: 4px;
    flex-wrap: wrap;
}

.ct-folder-modal-sel .ct-btn {
    font-size: 12px;
    padding: 5px 10px;
    height: 32px;
}

/* ── Cuerpo scrollable ── */
.ct-folder-modal-cards {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 24px);
}

/* ── List items: estilo Material list ── */
.ct-folder-modal-cards .ct-card {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 64px;
    cursor: default;
}

.ct-folder-modal-cards .ct-card:last-child {
    border-bottom: none !important;
}

.ct-folder-modal-cards .ct-card-row {
    padding: 10px 16px 10px 12px;
    min-height: 64px;
    gap: 14px;
    align-items: center;
}

/* Checkbox bought toggle: más grande y Material */
.ct-folder-modal-cards .ct-bought-toggle {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-width: 2px;
    flex-shrink: 0;
}

/* Título del artículo: mayor peso visual */
.ct-folder-modal-cards .ct-card-title {
    font-size: 15px;
    font-weight: 500;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta info (cantidad, precio, tienda) */
.ct-folder-modal-cards .ct-card-meta {
    gap: 6px;
}

.ct-folder-modal-cards .ct-meta-item {
    font-size: 13px;
}

.ct-folder-modal-cards .ct-meta-precio {
    color: var(--color-success-400, #4ade80);
    font-weight: 600;
}

/* Fecha: oculta en el modal (limpieza visual) */
.ct-folder-modal-cards .ct-card-date {
    display: none;
}

/* Artículo comprado */
.ct-folder-modal-cards .ct-card-bought {
    opacity: 0.45 !important;
}

/* ── Accordion expandido: fila de acciones Android ── */
.ct-folder-modal-cards .ct-card.ct-expanded .ct-card-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    padding: 6px 12px 10px !important;
    gap: 6px !important;
    background: rgba(255, 255, 255, 0.025);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 200px !important;
}

.ct-folder-modal-cards .ct-card.ct-expanded .ct-button-icon {
    flex: 1;
    flex-direction: column;
    gap: 4px !important;
    padding: 8px 4px !important;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    min-width: 0;
    height: auto !important;
    min-height: 54px;
    font-size: 10px;
    color: var(--color-text-secondary);
}

.ct-folder-modal-cards .ct-card.ct-expanded .ct-button-icon svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

.ct-folder-modal-cards .ct-card.ct-expanded .ct-action-label {
    display: block !important;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: var(--color-text-secondary);
}

.ct-folder-modal-cards .ct-card.ct-expanded .ct-btn-delete {
    color: var(--color-error-400, #f87171) !important;
}

.ct-folder-modal-cards .ct-card.ct-expanded .ct-btn-delete .ct-action-label {
    color: var(--color-error-400, #f87171) !important;
}

.ct-folder-modal-cards .ct-card.ct-expanded .ct-button-icon:active {
    background: rgba(255, 255, 255, 0.09);
}

/* Delete form dentro de accordion */
.ct-folder-modal-cards .ct-card.ct-expanded .ct-delete-form {
    flex: 1;
    display: flex !important;
}

/* ============================================
   BOTTOM SHEET: desglose de precios de lista
   ============================================ */

/* Chip de precio en tarjeta de lista */
.ct-card-folder .ct-card-preview {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.ct-card-folder .ct-card-preview::before {
    content: none;
}

