/* ============================================
   TEMA PASTEL CÁLIDO — Salmón · Albaricoque · Melocotón
   Paleta: #FFD1B3 · #FBCEB1 · #FFE5B4 · #FFA07A · #FFE0B2 · #FFBCB3
   Contraste WCAG AA garantizado en texto principal
   ============================================ */
:root {
    color-scheme: light;

    /* Escala primaria — Salmón / Albaricoque / Melocotón */
    --color-primary-50:  #fffaf4;   /* casi blanco cálido */
    --color-primary-100: #FFE5B4;   /* Melón */
    --color-primary-200: #FFE0B2;   /* Melocotón claro */
    --color-primary-300: #FFBCB3;   /* Rubor al atardecer */
    --color-primary-400: #FFD1B3;   /* Naranja pastel */
    --color-primary-500: #FBCEB1;   /* Albaricoque */
    --color-primary-600: #FFA07A;   /* Salmón claro — acento principal */
    --color-primary-700: #e07858;   /* salmón medio */
    --color-primary-800: #b85a38;   /* salmón oscuro */
    --color-primary-900: #8c3c1e;   /* terracota */

    /* Escala secundaria — Lavanda pastel (complemento suave) */
    --color-secondary-50:  #faf5ff;
    --color-secondary-100: #f3e8ff;
    --color-secondary-200: #e9d5ff;
    --color-secondary-300: #d8b4fe;
    --color-secondary-400: #c084fc;
    --color-secondary-500: #a855f7;
    --color-secondary-600: #9333ea;
    --color-secondary-700: #7e22ce;
    --color-secondary-800: #6b21a8;
    --color-secondary-900: #581c87;

    /* Escala de acento — Menta fresca */
    --color-accent-50:  #f0fdf4;
    --color-accent-100: #dcfce7;
    --color-accent-200: #bbf7d0;
    --color-accent-300: #86efac;
    --color-accent-400: #4ade80;
    --color-accent-500: #22c55e;
    --color-accent-600: #16a34a;
    --color-accent-700: #15803d;
    --color-accent-800: #166534;
    --color-accent-900: #14532d;

    /* Escala de advertencia — Ámbar */
    --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 suave */
    --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 éxito — Esmeralda */
    --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;

    /* Neutros cálidos — crema/arena, SIN grises fríos
       Escala invertida: 50 = texto oscuro, 900 = fondo claro */
    --color-neutral-50:  #2d1810;   /* marrón oscuro cálido — texto principal */
    --color-neutral-100: #4a2c1c;
    --color-neutral-200: #6b3e28;
    --color-neutral-300: #7a5040;
    --color-neutral-400: #a07060;   /* texto secundario */
    --color-neutral-500: #c49888;   /* texto terciario */
    --color-neutral-600: #e8d0bc;   /* borde suave */
    --color-neutral-700: #f5e8dc;   /* hover / superficie 2 */
    --color-neutral-800: #ffffff;   /* superficie blanca */
    --color-neutral-900: #fff9f2;   /* fondo crema melocotón */

    /* Variables semánticas — Light Theme */
    --color-background:    #fff9f2;
    --color-surface:       #ffffff;
    --color-surface-solid: #ffffff;
    --color-surface-2:     #f5e8dc;
    --color-bg:            #fff9f2;
    --color-bg-secondary:  #ffffff;
    --color-bg-tertiary:   #ffffff;
    --color-text-primary:  #2d1810;
    --color-text-secondary:#a07060;
    --color-text-tertiary: #c49888;
    --color-border:        rgba(160, 100, 60, 0.22);
    --color-border-subtle: rgba(160, 100, 60, 0.12);

    /* Acciones */
    --color-action-primary:        #FFA07A;
    --color-action-primary-hover:  #e07858;
    --color-action-primary-light:  rgba(255, 160, 122, 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.1);
    --color-action-success:      var(--color-success-500);
    --color-action-success-light:rgba(16, 185, 129, 0.1);

    /* Sombras cálidas — delicadas, sin negro puro */
    --shadow-sm: 0 1px 3px rgba(100, 50, 20, 0.08);
    --shadow-md: 0 4px 8px rgba(100, 50, 20, 0.10), 0 2px 4px rgba(100, 50, 20, 0.06);
    --shadow-lg: 0 10px 20px rgba(100, 50, 20, 0.12), 0 4px 8px rgba(100, 50, 20, 0.06);
    --shadow-xl: 0 20px 30px rgba(100, 50, 20, 0.14), 0 8px 12px rgba(100, 50, 20, 0.08);
    --shadow-colored: 0 8px 20px rgba(255, 160, 122, 0.22), 0 4px 8px rgba(255, 160, 122, 0.10);

    /* Efectos */
    --blur-backdrop: saturate(160%) blur(20px);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-base: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.25s 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;
}

.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;
    min-height: 100dvh;
    padding: 0 24px 24px 280px;
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Neutralize theme background layers when dashboard is active */
html:has(.ct-dashboard-container),
body:has(.ct-dashboard-container) {
    background: #fff9f2 !important;
    overflow-x: hidden;
}
body:has(.ct-dashboard-container) #page,
body:has(.ct-dashboard-container) .site,
body:has(.ct-dashboard-container) #content,
body:has(.ct-dashboard-container) .site-content,
body:has(.ct-dashboard-container) main,
body:has(.ct-dashboard-container) .wp-site-blocks,
body:has(.ct-dashboard-container) .entry-content,
body:has(.ct-dashboard-container) article {
    background: #fff9f2 !important;
}

/* Hide theme footer when dashboard is active */
body:has(.ct-dashboard-container) footer,
body:has(.ct-dashboard-container) .site-footer,
body:has(.ct-dashboard-container) #footer,
body:has(.ct-dashboard-container) #colophon {
    display: none !important;
}

.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: 20px;
    padding: 0 24px;
    height: 32px;
    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: 32px;
}

.ct-dock-item:hover {
    background: rgba(160, 100, 60, 0.07);
    transform: none;
}

.ct-dock-item:active {
    transform: none;
    background: rgba(160, 100, 60, 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-700);
    font-weight: 600;
}

/* Sidebar icons - flat, no background, no shadows */
.ct-dock-icon {
    width: 20px;
    height: 20px;
    border-radius: 0;
    flex-shrink: 0;
    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;
    filter: none;
    position: relative;
    z-index: 1;
}

/* 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-primary,
.ct-dock-icon-sky {
    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;
}

.ct-dock-item.ct-dock-item-register {
    background: rgba(255, 160, 122, 0.12);
    border: 1px solid rgba(255, 160, 122, 0.3);
    border-radius: 8px;
    padding: 8px;
}
.ct-dock-item.ct-dock-item-register .ct-dock-icon {
    color: var(--color-primary-700, #e07858);
}
.ct-dock-item.ct-dock-item-register .ct-dock-label {
    color: var(--color-primary-700, #e07858);
    font-weight: 600;
}
.ct-dock-item.ct-dock-item-register:hover {
    background: rgba(255, 160, 122, 0.18);
    border-color: rgba(255, 160, 122, 0.45);
}

/* Sidebar labels */
.ct-dock-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    letter-spacing: -0.01em;
    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(100, 50, 20, 0.15), 0 4px 8px rgba(255, 160, 122, 0.25);
    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-700);
    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;
}

.ct-search-wrapper {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.ct-search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: none;
    border-radius: 24px;
    background: var(--color-neutral-700);
    color: var(--color-text-primary) !important;
    font-size: 16px;
    font-weight: 400;
    transition: background 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
    outline: none;
}

.ct-search-input::placeholder {
    color: var(--color-neutral-400);
}

.ct-search-input:focus {
    padding-left: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-primary-600);
    box-shadow: 0 2px 8px rgba(255, 160, 122, 0.15);
}

.ct-search-icon {
    position: absolute;
    left: 16px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-neutral-400);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.ct-search-wrapper:focus-within .ct-search-icon {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   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(100, 50, 20, 0.15);
}

.ct-btn-secondary {
    background: transparent;
    color: var(--color-primary-700);
    border: 1px solid var(--color-neutral-600);
    box-shadow: none;
}

.ct-btn-secondary:hover {
    background: rgba(160, 100, 60, 0.07);
    transform: none;
    border-color: var(--color-neutral-500);
}

/* Botón "con peso": para la acción de compromiso de una tarjeta (p.ej. Crear
   encuesta) — más presencia que un ct-btn-secondary de contorno, pero sin
   competir con el color sólido del botón de envío principal del formulario */
.ct-btn-tinted {
    background: var(--color-action-primary-light);
    color: var(--color-primary-800);
    border: 1px solid transparent;
    box-shadow: none;
}

.ct-btn-tinted:hover {
    background: var(--color-primary-200);
}

.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(160, 100, 60, 0.07);
    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(160, 100, 60, 0.07);
    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: 0;
}

.ct-card:hover .ct-button-icon {
    opacity: 1;
}

.ct-button-icon:hover {
    background: rgba(160, 100, 60, 0.07);
    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;
}

/* Info section (guest CTA) */
.ct-info-section {
    background: linear-gradient(135deg, rgba(255,160,122,0.15) 0%, rgba(251,206,177,0.1) 100%);
    border: 1px solid rgba(255,160,122,0.3);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.ct-info-section-inner {
    display: flex;
    gap: 14px;
    align-items: center;
}
.ct-info-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,160,122,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-700, #e07858);
    flex-shrink: 0;
}
.ct-info-section-icon svg {
    width: 22px;
    height: 22px;
}
.ct-info-section-content h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
}
.ct-info-section-content p {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}
.ct-info-section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ct-info-cta {
    background: var(--color-action-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ct-info-cta:hover {
    background: var(--color-action-primary-hover);
}
.ct-info-note {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

/* 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(160, 100, 60, 0.05);
}

.ct-card-selected {
    background: rgba(255, 160, 122, 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;
}

/* 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-700);
}

/* 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-700);
    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-800);
    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-700);
    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 - visible only on hover */
.ct-card-actions {
    display: flex;
    gap: 0;
    opacity: 0.6;
    transition: opacity 0.1s ease;
}

.ct-card:hover .ct-card-actions {
    opacity: 1;
}

/* Received items - subtle salmon left border */
.ct-card-received {
    background: transparent;
    border-left: 2px solid var(--color-primary-700);
    color: var(--color-neutral-50);
    box-shadow: none;
}

.ct-card-received:hover {
    background: rgba(160, 100, 60, 0.05);
}

.ct-card-received .ct-card-icon {
    background: none;
    color: var(--color-primary-700);
}

.ct-card-received .ct-card-title a,
.ct-card-received .ct-card-title-btn {
    color: var(--color-text-primary);
}

.ct-card-received .ct-card-title a:hover,
.ct-card-received .ct-card-title-btn:hover {
    color: var(--color-primary-700);
}

.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(160, 100, 60, 0.07);
    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-800);
}

/* ============================================
   MODALS - CLEAN DARK STYLE
   ============================================ */
.ct-modal {
    display: none;
    position: fixed;
    z-index: 100020;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.32);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    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(100, 50, 20, 0.15);
    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(160, 100, 60, 0.07);
    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: var(--color-text-primary) !important;
    border-color: var(--color-neutral-600) !important;
}

select.ct-form-select option {
    background-color: var(--color-neutral-800);
    color: var(--color-text-primary);
}

.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;
}

/* Buscador de carpeta en modal Mover */
input.ct-form-input {
    width: 100%; padding: 8px 12px; margin-bottom: 8px;
    background: var(--color-neutral-900);
    border: 1px solid var(--color-neutral-700);
    border-radius: 8px; color: var(--color-text-primary); font-size: 14px; outline: none;
    box-sizing: border-box;
}
input.ct-form-input:focus { border-color: var(--color-primary-600); }
input.ct-form-input::placeholder { color: var(--color-neutral-500); }

.ct-folder-list {
    max-height: 220px; overflow-y: auto;
    border: 1px solid var(--color-neutral-700);
    border-radius: 8px; background: var(--color-neutral-900);
}
.ct-folder-option {
    padding: 9px 14px; font-size: 14px; color: var(--color-text-primary);
    cursor: pointer; transition: background 0.12s;
}
.ct-folder-option:hover { background: var(--color-neutral-800); }
.ct-folder-option.selected {
    background: var(--color-action-primary);
    color: #fff; font-weight: 500;
}

.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);
}

/* Extras del formulario (enlaces/encuesta/checklist): separados y colapsados
   por defecto para que los datos esenciales destaquen y no todo pese igual */
.ct-form-section-extras {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-subtle);
}

.ct-form-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: var(--color-neutral-800);
    border: 1px solid var(--color-neutral-700);
    border-radius: 6px;
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ct-form-section-toggle:hover {
    background: var(--color-neutral-750, var(--color-neutral-700));
    color: var(--color-text-primary);
}

.ct-form-section-toggle-icon {
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.ct-form-section-toggle[aria-expanded="true"] .ct-form-section-toggle-icon {
    transform: rotate(180deg);
}

.ct-form-section-body {
    margin-top: 16px;
}

.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(160, 100, 60, 0.06);
    transform: none;
}

.ct-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary-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(160, 100, 60, 0.07);
    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: 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    text-align: center;
    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(160, 100, 60, 0.06);
}

.ct-folder-icon-lg {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    color: var(--color-warning-500);
    filter: none;
    transition: color 0.15s ease;
}

.ct-folder-card:hover .ct-folder-icon-lg {
    transform: none;
    color: var(--color-warning-400);
}

.ct-folder-icon-lg svg {
    width: 100%;
    height: 100%;
}

.ct-folder-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.ct-folder-count {
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-weight: 400;
}

.ct-folder-delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ct-folder-card:hover .ct-folder-delete-form {
    opacity: 1;
}

/* 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-600, #FFA07A);
    border-color: var(--color-primary-600, #FFA07A);
    background: rgba(255, 160, 122, 0.12);
}

/* 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(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    margin-bottom: 16px;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 400;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.ct-guest-banner a {
    color: var(--color-primary-800) !important;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.6;
    display: inline-block;
    text-decoration: none !important;
    font-weight: 600;
    font-family: inherit;
    transition: background .15s;
    white-space: nowrap;
    cursor: pointer;
}
.ct-guest-banner a:hover {
    background: rgba(99, 102, 241, 0.25);
}

.ct-guest-banner svg {
    color: var(--color-warning-600);
    flex-shrink: 0;
}

.ct-guest-banner-urgent {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}
.ct-guest-banner-urgent svg {
    color: var(--color-error-700, #be123c);
}
.ct-guest-banner-urgent a {
    color: var(--color-primary-800) !important;
}

/* Modal Registro */
.ct-register-modal {
    position: fixed;
    inset: 0;
    z-index: 1100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.ct-register-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.ct-register-modal-content {
    position: relative;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, rgba(160,100,60,0.22));
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(100, 50, 20, 0.12);
    overflow: hidden;
}
.ct-register-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border, rgba(160,100,60,0.22));
    flex-shrink: 0;
}
.ct-register-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary, #2d1810);
}
.ct-register-modal-header h3 svg {
    color: var(--color-primary-700, #e07858);
}
.ct-register-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.ct-register-modal-close:hover {
    color: var(--color-text-primary);
}
.ct-register-modal-body {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(160,100,60,0.25) transparent;
}
.ct-register-modal-body::-webkit-scrollbar {
    width: 4px;
}
.ct-register-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.ct-register-modal-body::-webkit-scrollbar-thumb {
    background: rgba(160,100,60,0.25);
    border-radius: 2px;
}

@media (max-width: 480px) {
    .ct-register-modal {
        padding: 0;
        align-items: flex-end;
    }
    .ct-register-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }
}
.ct-register-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Lost Password Modal */
.ct-lost-password-modal-content {
    height: auto;
    max-height: 90vh;
}
.ct-lost-password-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ct-lost-password-inner {
    text-align: center;
    padding: 32px 32px 40px;
    max-width: 380px;
    width: 100%;
}
.ct-lost-password-icon {
    color: var(--color-primary-700, #e07858);
    margin-bottom: 16px;
}
.ct-lost-password-inner p {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}
.ct-lost-password-modal-content .ct-lost-password-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border, rgba(160,100,60,0.22));
    border-radius: 8px;
    background: var(--color-bg, #fff9f2);
    color: var(--color-text-primary) !important;
    -webkit-text-fill-color: var(--color-text-primary);
    caret-color: #FFA07A;
    font-size: 14px;
    outline: none;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.ct-lost-password-modal-content .ct-lost-password-input::placeholder {
    color: #c49888;
}
.ct-lost-password-modal-content .ct-lost-password-input:-webkit-autofill,
.ct-lost-password-modal-content .ct-lost-password-input:-webkit-autofill:hover,
.ct-lost-password-modal-content .ct-lost-password-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2d1810;
    box-shadow: 0 0 0 1000px #fff9f2 inset;
    caret-color: #FFA07A;
}
.ct-lost-password-input:focus {
    border-color: var(--color-primary-600, #FFA07A);
}
.ct-lost-password-submit {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--color-action-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
}
.ct-lost-password-submit:hover {
    background: var(--color-action-primary-hover);
}
.ct-lost-password-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ct-lost-password-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.4;
}
.ct-lost-password-msg.ct-msg-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.ct-lost-password-msg.ct-msg-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
/* Sidebar lost password button */
.ct-dock-item.ct-dock-item-lost-password {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 8px;
    padding: 8px;
}
.ct-dock-item.ct-dock-item-lost-password .ct-dock-icon {
    color: var(--color-warning-400, #fbbf24);
}
.ct-dock-item.ct-dock-item-lost-password .ct-dock-label {
    color: var(--color-warning-400, #fbbf24);
    font-weight: 600;
}
.ct-dock-item.ct-dock-item-lost-password:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
}

/* Sidebar info button */
.ct-dock-item.ct-dock-item-info {
    background: rgba(255, 160, 122, 0.1);
    border: 1px solid rgba(255, 160, 122, 0.25);
    border-radius: 8px;
    padding: 8px;
}
.ct-dock-item.ct-dock-item-info .ct-dock-icon {
    color: var(--color-primary-700, #e07858);
}
.ct-dock-item.ct-dock-item-info .ct-dock-label {
    color: var(--color-primary-700, #e07858);
    font-weight: 600;
}
.ct-dock-item.ct-dock-item-info:hover {
    background: rgba(255, 160, 122, 0.18);
    border-color: rgba(255, 160, 122, 0.4);
}

/* Public User Profile Modal */
.ct-user-profile-trigger {
    cursor: pointer;
}
/* Forzar posicionamiento independiente del contenedor padre — evita que un
   transform/filter del tema atrape el modal dentro de su stacking context */
#ct-user-profile-modal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2147483647 !important; /* máximo z-index posible */
}
.ct-user-profile-modal-content {
    max-width: 440px;
    max-height: 90vh;
}
.ct-user-profile-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ct-user-profile-inner {
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.ct-user-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.ct-user-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary-600, #FFA07A);
    background: var(--color-neutral-800, #ffffff);
}
.ct-user-profile-meta h4 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary, #2d1810);
}
.ct-user-profile-meta span {
    font-size: 13px;
    color: var(--color-text-secondary);
}
.ct-user-profile-bio {
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    background: rgba(160,100,60,0.05);
    border: 1px solid rgba(160,100,60,0.15);
    border-radius: 10px;
    padding: 12px 14px;
    min-height: 44px;
}
.ct-user-profile-website {
    font-size: 13px;
    color: var(--color-primary-700, #e07858);
    text-decoration: none;
    font-weight: 600;
}
.ct-user-profile-website:hover {
    text-decoration: underline;
}
.ct-user-profile-registered {
    font-size: 11px;
    color: var(--color-text-tertiary, #9ca3af);
}

/* Reload bar after login/register */
.ct-reload-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: var(--color-surface, #ffffff);
    border-bottom: 1px solid var(--color-border, rgba(160,100,60,0.22));
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(100, 50, 20, 0.1);
    animation: ctReloadSlideDown 0.3s ease;
}
@keyframes ctReloadSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.ct-reload-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-text-primary, #2d1810);
    font-size: 14px;
    font-weight: 500;
}
.ct-reload-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 160, 122, 0.3);
    border-top-color: var(--color-primary-600, #FFA07A);
    border-radius: 50%;
    animation: ctReloadSpin 0.6s linear infinite;
    flex-shrink: 0;
}
@keyframes ctReloadSpin {
    to { transform: rotate(360deg); }
}
.ct-reload-progress {
    flex: 1;
    height: 4px;
    background: rgba(160, 100, 60, 0.15);
    border-radius: 2px;
    overflow: hidden;
}
.ct-reload-progress-fill {
    height: 100%;
    background: var(--color-primary-600, #FFA07A);
    border-radius: 2px;
    animation: ctReloadFill 1.5s ease forwards;
}
@keyframes ctReloadFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Nav loading bar (AJAX section switches) */
.ct-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 999999;
    pointer-events: none;
    background: transparent;
}
.ct-nav-bar-fill {
    height: 100%;
    background: var(--color-primary-600, #FFA07A);
    border-radius: 0 2px 2px 0;
    width: 0%;
    animation: ctNavFill 0.7s cubic-bezier(0.1, 0.4, 0.8, 1) forwards;
}
@keyframes ctNavFill {
    0%   { width: 0%;   opacity: 1; }
    70%  { width: 75%;  opacity: 1; }
    100% { width: 100%; opacity: 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 {
    position: relative;
    margin-bottom: 16px;
}

.ct-search-filter input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1px solid var(--color-neutral-600);
    border-radius: 4px;
    font-size: 14px;
    background: var(--color-neutral-900);
    color: var(--color-text-primary) !important;
    transition: border-color 0.15s ease;
}

.ct-search-filter input:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: none;
}

.ct-search-filter svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-400);
    width: 18px;
    height: 18px;
    transition: opacity 0.2s ease;
}

.ct-search-filter:focus-within svg {
    opacity: 0;
}

.ct-search-filter input:focus {
    padding-left: 14px;
}

.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;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {
    .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: 4px 0 calc(4px + env(safe-area-inset-bottom));
        flex-direction: row;
        overflow: visible;
        background: var(--color-neutral-900);
    }

    .ct-dock-inner {
        flex-direction: row;
        gap: 0;
        overflow-x: auto;
        justify-content: space-around;
        width: 100%;
    }

    .ct-dock-item {
        flex-direction: column;
        gap: 2px;
        padding: 6px 4px;
        min-width: 56px;
        width: auto;
        height: auto;
        border-radius: 0;
    }

    .ct-dock-label {
        display: block;
        font-size: 10px;
        color: var(--color-text-tertiary);
        text-align: center;
    }

    .ct-dock-divider {
        display: none;
    }

    .ct-dock-item-primary {
        width: auto !important;
        height: auto;
        padding: 6px 4px;
        margin: 0;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .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: 10px;
    }

    .ct-badge {
        position: absolute;
        top: 0;
        right: 4px;
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        padding: 0 3px;
        background: var(--color-error-600);
    }

    .ct-dashboard-container {
        padding-left: 8px;
        padding-right: 8px;
        padding-top: 8px;
        padding-bottom: 80px;
    }

    .ct-toolbar-title h1 {
        font-size: 18px;
    }

    .ct-selection-bar {
        padding: 4px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .ct-selection-actions {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ct-selection-actions .ct-btn,
    .ct-selection-actions .ct-btn-danger {
        width: 100%;
    }

    .ct-selection-actions form[style] {
        display: block !important;
        width: 100%;
    }

    .ct-selection-actions form .ct-btn {
        width: 100%;
        justify-content: center;
    }

    .ct-btn {
        padding: 8px 12px;
        font-size: 13px;
        justify-content: center;
    }

    /* 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: 160px;
        font-size: 13px;
    }

    .ct-card-body {
        display: none;
    }

    .ct-card-footer {
        padding-right: 8px;
    }

    .ct-card-date {
        font-size: 11px;
    }

    .ct-card-actions {
        opacity: 1;
    }

    .ct-button-icon {
        opacity: 1;
    }

    .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
   ============================================ */

/* 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(100, 50, 20, 0.12), 0 4px 8px rgba(255, 160, 122, 0.25);
}

.ct-dock-compose-btn svg {
    flex-shrink: 0;
}

/* Gmail-style top search bar */
.ct-gmail-searchbar {
    padding: 20px 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.ct-gmail-search-copy {
    width: 100%;
    max-width: 720px;
}

.ct-gmail-search-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 160, 122, 0.12);
    border: 1px solid rgba(255, 160, 122, 0.3);
    color: var(--color-primary-800);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ct-gmail-search-heading {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    line-height: 1.05;
    font-weight: 800;
    color: var(--color-text-primary);
    letter-spacing: -0.03em;
}

.ct-gmail-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
}

.ct-gmail-search-field {
    width: 100%;
    padding: 16px 18px 16px 52px;
    border: 1px solid rgba(160, 100, 60, 0.22);
    border-radius: 22px;
    background: #ffffff;
    color: var(--color-text-primary) !important;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    box-shadow: 0 4px 16px rgba(100, 50, 20, 0.08);
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ct-gmail-search-field::placeholder {
    color: var(--color-neutral-400);
}

.ct-gmail-search-field:focus {
    background: #ffffff;
    border-color: rgba(255, 160, 122, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 160, 122, 0.15);
    transform: translateY(-1px);
}

.ct-gmail-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-400);
    pointer-events: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.ct-gmail-search-wrapper:focus-within .ct-gmail-search-icon {
    color: var(--color-primary-700);
}

/* 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(160, 100, 60, 0.07);
    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: 0.6;
    transition: opacity 0.1s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.ct-card:hover .ct-card-row .ct-card-actions {
    opacity: 1;
}

.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;
}

/* ==========================================================================
   Brand comments wall — feed en tiempo real debajo del buscador
   ========================================================================== */
.ct-brand-comments-wall {
    width: 100%;
    max-width: 620px;
    margin: 4px auto 22px;
    padding: 0;
    border-radius: 0;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

/* Variante para el search home centrado (debajo de los shortcuts) */
.ct-brand-comments-wall--searchhome {
    width: 100%;
    max-width: 560px;
    margin: 32px auto 16px;
}

.ct-brand-comments-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.ct-brand-comments-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: ct-brand-comments-pulse 1.8s ease-out infinite;
    flex-shrink: 0;
}

@keyframes ct-brand-comments-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ct-brand-comments-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.ct-brand-comments-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-variant-numeric: tabular-nums;
}

.ct-brand-comments-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ct-brand-comments-skeleton,
.ct-brand-comments-empty {
    font-size: 14px;
    color: var(--color-text-tertiary);
    padding: 18px 4px;
    text-align: center;
}

.ct-brand-comment-item {
    display: flex;
    gap: 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    transition: opacity 0.15s ease;
}

.ct-brand-comment-item:hover {
    background: transparent;
    border-color: transparent;
}

.ct-brand-comment-item.is-new {
    animation: ct-brand-comment-in 0.45s ease-out;
}

@keyframes ct-brand-comment-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ct-brand-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 160, 122, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary-800);
    padding: 0;
    border: 0;
    font-family: inherit;
}

button.ct-brand-comment-avatar {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.ct-brand-comment-avatar:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 2px rgba(255, 160, 122, 0.35);
}

.ct-brand-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-brand-comment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ct-brand-comment-meta {
    display: flex;
    gap: 6px;
    align-items: baseline;
    font-size: 13px;
    color: var(--color-text-tertiary);
    flex-wrap: wrap;
}

.ct-brand-comment-author {
    font-weight: 600;
    color: var(--color-text-primary);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.6;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

button.ct-brand-comment-author {
    cursor: pointer;
}

button.ct-brand-comment-author:hover {
    background: rgba(16, 185, 129, 0.22);
    text-decoration: none;
}

.ct-brand-comment-brand {
    color: var(--color-primary-800);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.6;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background .15s;
    white-space: nowrap;
}

.ct-brand-comment-brand:hover {
    background: rgba(99, 102, 241, 0.25);
    text-decoration: none;
}

.ct-brand-comment-brand:disabled {
    opacity: 0.7;
    cursor: wait;
}

.ct-brand-url-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ct-brand-spin 0.6s linear infinite;
    margin-left: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

@keyframes ct-brand-spin {
    to { transform: rotate(360deg); }
}

.ct-brand-comment-sep {
    opacity: 0.5;
}

/* "↩ Autor padre" en ítems de respuesta */
.ct-brand-comment-reply-to {
    color: var(--color-text-tertiary);
    font-weight: 400;
    font-size: 12px;
}

.ct-brand-comment-time {
    margin-left: auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ct-brand-comment-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-primary);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.ct-brand-comment-task {
    font-size: 12px;
    color: var(--color-text-tertiary);
    font-style: italic;
    background: none;
    border: 1px solid;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    align-self: flex-start;
}

.ct-brand-comment-task:hover {
    color: var(--color-primary-700);
    text-decoration: underline;
}

.ct-brand-comment-text a {
    color: var(--color-primary-800);
    text-decoration: none;
    word-break: break-all;
}

.ct-brand-comment-text a:hover {
    text-decoration: underline;
}

/* Descripción de campaña en el muro de actividad: misma tipografía que un
   comentario normal, pero sin el line-clamp (el contenido trae HTML con
   formato -listas, títulos- y no debe recortarse a 4 líneas de texto). */
.ct-campaign-feed-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-primary);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.ct-campaign-feed-desc a {
    color: var(--color-primary-800);
    text-decoration: none;
    word-break: break-all;
}

.ct-campaign-feed-desc a:hover {
    text-decoration: underline;
}

.ct-campaign-feed-desc ul,
.ct-campaign-feed-desc ol {
    margin: 6px 0;
    padding-left: 22px;
}

.ct-campaign-feed-desc h2,
.ct-campaign-feed-desc h3,
.ct-campaign-feed-desc h4 {
    margin: 8px 0 4px;
    line-height: 1.3;
    font-weight: 700;
}

.ct-campaign-feed-desc h2 { font-size: 18px; }
.ct-campaign-feed-desc h3 { font-size: 16px; }
.ct-campaign-feed-desc h4 { font-size: 15px; }

.ct-brand-comment-preview {
    margin-top: 10px;
}

.ct-brand-comment-preview:empty {
    display: none;
}

.ct-brand-comment-preview .ct-link-preview-card {
    max-width: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.ct-brand-comment-preview .ct-link-preview-full-img {
    max-height: 420px;
    object-fit: cover;
    width: 100%;
    border-radius: 14px;
}

/* Botón "volver arriba" al final del muro */
.ct-brand-comments-sentinel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px 0 0;
    color: var(--color-text-tertiary);
}

.ct-brand-comments-sentinel.is-loading {
    min-height: 56px;
}

.ct-brand-comments-sentinel-text {
    font-size: 12px;
    letter-spacing: 0.01em;
}

.ct-brand-comments-loader {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ct-brand-comments-loader span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--color-primary-600);
    opacity: 0.35;
    animation: ct-brand-comments-loader 1.1s ease-in-out infinite;
}

.ct-brand-comments-loader span:nth-child(2) { animation-delay: 0.15s; }
.ct-brand-comments-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ct-brand-comments-loader {
    0%, 80%, 100% { opacity: 0.35; transform: scale(0.82); }
    40% { opacity: 1; transform: scale(1.15); }
}

/* ── Like bar en feed ──────────────────────────────────── */
.ct-brand-comment-item .ct-like-bar { margin-top: 6px; }

/* ── "Leer más" — colapso de comentarios largos ─────────── */
.ct-brand-comment-item .ct-brand-comment-text:not(.is-expanded) {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ct-brand-comment-item .ct-brand-comment-text.is-expanded {
    display: block;
    overflow: visible;
}
.ct-brand-comment-item .ct-campaign-feed-desc:not(.is-expanded) {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ct-brand-comment-item .ct-campaign-feed-desc.is-expanded {
    display: block;
    overflow: visible;
}
.ct-read-more-btn {
    display: none;          /* hidden until JS confirms overflow */
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-700, #c05820);
    background: none;
    border: none;
    padding: 3px 0 0;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition: color .15s;
}
.ct-read-more-btn.is-visible {
    display: inline-flex;
}
.ct-read-more-btn:hover {
    color: var(--color-primary-600, #FFA07A);
}
.ct-read-more-btn svg {
    flex-shrink: 0;
    transition: transform .2s;
}
.ct-read-more-btn.is-expanded svg {
    transform: rotate(180deg);
}

/* ── Android Material 3 skin ───────────────────────────── */
.ct-brand-comments-list {
    gap: 10px;
}

.ct-brand-comment-item {
    background: var(--color-neutral-800, #ffffff);
    border-radius: 16px;
    padding: 14px 16px 12px;
    border: 1px solid var(--color-border, rgba(160,100,60,0.22));
    gap: 12px;
    box-shadow: 0 1px 3px rgba(100,50,20,0.08);
    transition: background 0.15s, box-shadow 0.15s;
}

.ct-brand-comment-item:hover {
    background: var(--color-neutral-700, #f5e8dc);
    border-color: var(--color-neutral-500, rgba(160,100,60,0.35));
    box-shadow: 0 3px 10px rgba(100,50,20,0.12);
}

.ct-brand-comment-meta {
    font-size: 12px;
    align-items: center;
    gap: 5px;
}

.ct-brand-comment-author { font-size: 13px; }

.ct-brand-comment-time { font-size: 11px; }

.ct-brand-comment-text {
    font-size: 14px;
    line-height: 1.55;
}

.ct-brand-comment-task {
    font-style: normal;
    border-radius: 999px;
    background: rgba(255, 160, 122, 0.1);
    border-color: rgba(255, 160, 122, 0.25);
    color: var(--color-primary-800, #b85a38);
    padding: 4px 12px;
    font-size: 12px;
    margin-top: 2px;
}

.ct-brand-comment-task:hover {
    background: rgba(255, 160, 122, 0.18);
    border-color: rgba(255, 160, 122, 0.4);
    color: var(--color-primary-700, #e07858);
    text-decoration: none;
}

.ct-brand-comment-item .ct-brand-comment-preview .ct-link-preview-card {
    border-radius: 12px;
}

.ct-brand-comment-item .ct-like-bar { margin-top: 8px; }

/* ── Tarjeta de campaña sin comentarios en el muro ─────── */
.ct-campaign-feed-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.ct-campaign-feed-item.ct-brand-comment-item {
    align-items: flex-start;
}

.ct-campaign-feed-item .ct-brand-comment-author {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.6;
}

.ct-campaign-feed-item .ct-brand-comment-author:hover {
    background: rgba(255,255,255,0.14);
    text-decoration: none;
}

.ct-campaign-feed-item .ct-brand-comment-brand {
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.6;
}

.ct-campaign-feed-item .ct-brand-comment-brand:hover {
    background: rgba(99,102,241,0.25);
    text-decoration: none;
}

.ct-campaign-feed-item .ct-brand-comment-task {
    font-size: 13px;
    font-weight: 700;
    font-style: normal;
    border-radius: 8px;
    padding: 4px 10px;
}

/* ── Modal Likers ──────────────────────────────────────── */
.ct-likers-modal-content {
    max-width: 340px;
    width: 90vw;
}
.ct-likers-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    overflow-y: auto;
    max-height: 50vh;
}
.ct-likers-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: var(--radius-sm, 6px);
    font-family: inherit;
    color: var(--color-text-primary, #2d1810);
    font-size: 14px;
    transition: background .12s;
}
.ct-likers-modal-item:hover { background: rgba(160,100,60,0.07); }
.ct-likers-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,160,122,.15);
}
.ct-likers-name { font-weight: 500; }
.ct-likers-empty {
    padding: 20px 16px;
    color: var(--color-text-tertiary, #64748b);
    font-size: 13px;
    text-align: center;
    margin: 0;
}

.ct-brand-comments-top-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 28px;
    padding: 10px 0;
    background: transparent;
    border: 1px solid rgba(160, 100, 60, 0.22);
    border-radius: 12px;
    color: var(--color-text-tertiary);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    letter-spacing: 0.02em;
}

.ct-brand-comments-top-btn:hover {
    color: var(--color-primary-700);
    border-color: rgba(255, 160, 122, 0.3);
    background: rgba(255, 160, 122, 0.07);
}

.ct-brand-comments-top-btn svg {
    flex-shrink: 0;
}

/* FAB flotante "Volver arriba" del muro */
#ct-wall-back-top {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: var(--color-bg-secondary, #ffffff);
    border: 1px solid rgba(160, 100, 60, 0.22);
    border-radius: 999px;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, color 0.15s, border-color 0.15s, background 0.15s;
    box-shadow: 0 4px 20px rgba(100,50,20,0.12);
}
#ct-wall-back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
#ct-wall-back-top:hover {
    color: var(--color-primary-700, #e07858);
    border-color: rgba(255, 160, 122, 0.35);
    background: rgba(255, 160, 122, 0.08);
}
#ct-wall-back-top:active { transform: translateX(-50%) scale(0.96); }
#ct-wall-back-top svg { flex-shrink: 0; }

@media (max-width: 600px) {
    #ct-wall-back-top { bottom: 70px; padding: 9px 14px; font-size: 12px; }
}

/* Responsive for new elements */
@media (max-width: 768px) {
    .ct-brand-comments-wall {
        margin: 0 auto 16px;
        padding: 0;
        border-radius: 0;
    }

    .ct-brand-comments-title {
        font-size: 11px;
    }

    .ct-brand-comments-list {
        gap: 22px;
    }

    .ct-brand-comment-avatar {
        width: 40px;
        height: 40px;
    }

    .ct-brand-comment-text {
        font-size: 14px;
    }

    .ct-dock-logo {
        display: none;
    }

    .ct-dock-compose-btn {
        display: none;
    }

    .ct-gmail-searchbar {
        padding: 12px 0 10px;
        gap: 10px;
    }

    .ct-gmail-search-eyebrow {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .ct-gmail-search-heading {
        font-size: 1.9rem;
    }

    .ct-gmail-search-field {
        font-size: 14px;
        padding: 13px 14px 13px 42px;
        border-radius: 18px;
    }

    .ct-card-row {
        padding: 0 8px;
        gap: 8px;
    }

    .ct-card-preview {
        display: none;
    }

    .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;
    }
}

/* Selection bar inside awin folder detail */
.awin-folder-sel-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 10px;
    background: var(--color-surface-2, #f5e8dc);
    border: 1px solid var(--color-border, rgba(160,100,60,0.22));
    border-radius: 10px;
    flex-wrap: wrap;
}
.awin-folder-sel-bar.is-visible { display: flex; }
.awin-folder-sel-bar label {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--color-text-secondary);
    cursor: pointer;
}
.awin-folder-sel-count {
    font-size: 13px; font-weight: 600;
    color: var(--color-text-primary, #2d1810);
    margin-left: 4px;
}
.awin-folder-sel-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
