/* ============================================================
   ALPHAVAULT WORKSPACE HUB — workspace-hub.css v2.0
   Aligné 100% sur le design system Deal Sourcing (monochrome ink)
   Full dark/light responsive — Classes aws-/ews-/aa- conservées à l'identique
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   1. CSS VARIABLES — MONOCHROME INK SYSTEM (dark par défaut)
══════════════════════════════════════════════════════════════ */
:root {
    /* Ink scale */
    --aws-ink:            #fafafa;
    --aws-ink-soft:       #d4d4d4;

    /* Brand — tout ramené à l'ink (monochrome strict) */
    --aws-primary:        #fafafa;
    --aws-primary-dim:    rgba(250,250,250,0.08);
    --aws-secondary:      #d4d4d4; 
    --aws-green:          #fafafa;
    --aws-amber:          #fafafa;
    --aws-blue:           #fafafa;
    --aws-purple:         #fafafa;
    --aws-indigo:         #fafafa;
    --aws-cyan:           #fafafa;

    /* Seule couleur conservée : danger */
    --aws-red:            #ef4444;
    --aws-red-bg:         rgba(239, 68, 68, 0.12);

    /* Dark mode colors */
    --aws-bg:             #0a0a0a;
    --aws-bg-2:           #0a0a0a;
    --aws-bg-3:           #141414;
    --aws-card:           #0f0f0f;
    --aws-card-hover:     #171717;
    --aws-border:         #262626;
    --aws-border-hover:   #404040;
    --aws-text:           #fafafa;
    --aws-text-dim:       #a3a3a3;
    --aws-text-muted:     #737373;
    --aws-input-bg:       #141414;
    --aws-input-border:   #262626;
    --aws-shadow:         0 4px 12px rgba(0,0,0,0.35);
    --aws-shadow-lg:      0 12px 32px rgba(0,0,0,0.55);
    --aws-shadow-card:    0 4px 12px rgba(0,0,0,0.35);

    /* Dark sidebar */
    --aws-sidebar-bg:            #0a0a0a;
    --aws-sidebar-bg-2:          #141414;
    --aws-sidebar-border:        #262626;
    --aws-sidebar-text:          #a3a3a3;
    --aws-sidebar-text-active:   #fafafa;
    --aws-sidebar-hover:         #171717;
    --aws-sidebar-active:        #fafafa;
    --aws-sidebar-active-text:   #0a0a0a;
    --aws-sidebar-label:         #525252;
    --aws-sidebar-icon:          #737373;
    --aws-sidebar-link:          #737373;

    /* Dark header */
    --aws-header-bg:      rgba(10,10,10,0.97);
    --aws-header-border:  #262626;
    --aws-header-text:    #a3a3a3;

    /* Dimensions */
    --aws-sidebar-w:           240px;
    --aws-sidebar-w-collapsed:  60px;
    --aws-header-h:             56px;
    --aws-panel-w:             300px;

    /* Radii */
    --aws-radius:    6px;
    --aws-radius-lg: 10px;
    --aws-radius-xl: 14px;

    /* Transitions */
    --aws-transition:         all 0.15s ease;
    --aws-transition-sm:      all 0.15s ease;
    --aws-transition-sidebar: width 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ══════════════════════════════════════════════════════════════
   2. CSS VARIABLES — LIGHT MODE
══════════════════════════════════════════════════════════════ */
body.light-mode {
    --aws-ink:            #0a0a0a;
    --aws-ink-soft:       #404040;

    --aws-primary:        #0a0a0a;
    --aws-primary-dim:    rgba(10,10,10,0.06);
    --aws-secondary:      #262626;
    --aws-green:          #0a0a0a;
    --aws-amber:          #0a0a0a;
    --aws-blue:           #0a0a0a;
    --aws-purple:         #0a0a0a;
    --aws-indigo:         #0a0a0a;
    --aws-cyan:           #0a0a0a;

    --aws-red:            #dc2626;
    --aws-red-bg:         #fef2f2;

    --aws-bg:             #fafafa;
    --aws-bg-2:           #ffffff;
    --aws-bg-3:           #fafafa;
    --aws-card:           #ffffff;
    --aws-card-hover:     #fafafa;
    --aws-border:         #e5e5e5;
    --aws-border-hover:   #d4d4d4;
    --aws-text:           #0a0a0a;
    --aws-text-dim:       #525252;
    --aws-text-muted:     #a3a3a3;
    --aws-input-bg:       #ffffff;
    --aws-input-border:   #e5e5e5;
    --aws-shadow:         0 1px 3px rgba(0,0,0,0.06);
    --aws-shadow-lg:      0 12px 32px rgba(0,0,0,0.10);
    --aws-shadow-card:    0 1px 4px rgba(0,0,0,0.05);

    /* Light sidebar */
    --aws-sidebar-bg:          #ffffff;
    --aws-sidebar-bg-2:        #fafafa;
    --aws-sidebar-border:      #e5e5e5;
    --aws-sidebar-text:        #525252;
    --aws-sidebar-text-active: #0a0a0a;
    --aws-sidebar-hover:       #fafafa;
    --aws-sidebar-active:      #0a0a0a;
    --aws-sidebar-active-text: #fafafa;
    --aws-sidebar-label:       #a3a3a3;
    --aws-sidebar-icon:        #a3a3a3;
    --aws-sidebar-link:        #a3a3a3;

    /* Light header */
    --aws-header-bg:     rgba(255,255,255,0.97);
    --aws-header-border: #e5e5e5;
    --aws-header-text:   #525252;
}

/* ══════════════════════════════════════════════════════════════
   3. RESET & BASE
══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin:  0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.aws-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--aws-bg);
    color:      var(--aws-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing:  antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 13px;
    line-height: 1.5;
}

a       { color: inherit; text-decoration: none; }
button  { font-family: inherit; }
img     { max-width: 100%; display: block; }

/* ══════════════════════════════════════════════════════════════
   4. ROOT LAYOUT (CSS Grid)
══════════════════════════════════════════════════════════════ */
#awsApp {
    display: grid;
    grid-template-columns: var(--aws-sidebar-w) 1fr;
    grid-template-rows:    var(--aws-header-h) 1fr;
    min-height: 100vh;
    transition: grid-template-columns var(--aws-transition-sidebar);
    position: relative;
}

#awsApp.sidebar-collapsed {
    grid-template-columns: var(--aws-sidebar-w-collapsed) 1fr;
}

/* ══════════════════════════════════════════════════════════════
   5. SIDEBAR
══════════════════════════════════════════════════════════════ */
#awsSidebar {
    grid-row:    1 / -1;
    grid-column: 1;
    background:  var(--aws-sidebar-bg);
    border-right: 1px solid var(--aws-sidebar-border);
    display:        flex;
    flex-direction: column;
    height:   100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    width: var(--aws-sidebar-w);
    transition: var(--aws-transition-sidebar);
    overflow: visible;
}

body.light-mode #awsSidebar {
    box-shadow: 2px 0 20px rgba(0,0,0,0.05);
}

#awsSidebar.collapsed {
    width: var(--aws-sidebar-w-collapsed);
}

/* ══════════════════════════════════════════════════════════════
   5A. SIDEBAR LOGO
══════════════════════════════════════════════════════════════ */
.aws-sidebar-logo {
    display:         flex;
    align-items:     center;
    justify-content: flex-start;
    gap:     10px;
    padding: 14px 16px 12px;
    text-decoration: none;
    border-bottom: 1px solid var(--aws-sidebar-border);
    margin-bottom: 6px;
    flex-shrink: 0;
    min-height: var(--aws-header-h);
    overflow: hidden;
    transition: padding 0.25s ease, justify-content 0.25s ease;
}

.aws-sidebar-logo-icon {
    display:    none;
    width:      30px;
    height:     30px;
    object-fit: contain;
    flex-shrink: 0;
}

.aws-sidebar-logo-text {
    display:    block;
    height:     28px;
    max-width:  160px;
    object-fit: contain;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

body.light-mode .aws-sidebar-logo-text { filter: none; }
body:not(.light-mode) .aws-sidebar-logo-text { filter: invert(1) brightness(1.8); }

#awsSidebar.collapsed .aws-sidebar-logo-icon {
    display:    flex;
    align-items: center;
    justify-content: center;
    width:      30px;
    height:     30px;
    object-fit: contain;
    flex-shrink: 0;
}

#awsSidebar.collapsed .aws-sidebar-logo-text {
    display: none;
}

#awsSidebar.collapsed .aws-sidebar-logo {
    justify-content: center;
    padding: 14px 0 12px;
}

/* ══════════════════════════════════════════════════════════════
   5B. SIDEBAR SCROLL AREA
══════════════════════════════════════════════════════════════ */
.aws-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 8px;
}

.aws-sidebar-scroll::-webkit-scrollbar       { width: 3px; }
.aws-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.aws-sidebar-scroll::-webkit-scrollbar-thumb {
    background:    var(--aws-sidebar-border);
    border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   5C. NAV LABELS
══════════════════════════════════════════════════════════════ */
.aws-nav-label {
    font-size:      9px;
    font-weight:    800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color:    var(--aws-sidebar-label);
    padding:  10px 16px 4px;
    white-space: nowrap;
    overflow:    hidden;
    user-select: none;
    transition:  opacity 0.2s;
}

#awsSidebar.collapsed .aws-nav-label { opacity: 0; }

/* ══════════════════════════════════════════════════════════════
   5D. NAV ITEMS
══════════════════════════════════════════════════════════════ */
.aws-nav-item {
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 8px 10px;
    margin:  1px 8px;
    border-radius: var(--aws-radius);
    cursor:     pointer;
    transition: var(--aws-transition-sm);
    white-space: nowrap;
    overflow:    hidden;
    color:       var(--aws-sidebar-text);
    position:    relative;
    user-select: none;
}

#awsSidebar.collapsed .aws-nav-item {
    justify-content: center;
    padding: 8px 0;
    margin:  1px 6px;
    gap: 0;
}

.aws-nav-item:hover {
    background: var(--aws-sidebar-hover);
    color:      var(--aws-sidebar-text-active);
}

.aws-nav-item.active {
    background: var(--aws-sidebar-active);
    color:      var(--aws-sidebar-active-text);
}

.aws-nav-item.active .aws-nav-item-icon {
    color: var(--aws-sidebar-active-text);
}

#awsSidebar.collapsed .aws-nav-item::after {
    content:  attr(data-tip);
    position: absolute;
    left:     calc(var(--aws-sidebar-w-collapsed) + 8px);
    top:      50%;
    transform: translateY(-50%);
    background:    var(--aws-card);
    border: 1px solid var(--aws-border);
    color:         var(--aws-text);
    padding:       5px 10px;
    border-radius: var(--aws-radius);
    font-size:     11px;
    font-weight:   600;
    white-space:   nowrap;
    pointer-events: none;
    opacity:    0;
    transition: opacity 0.15s;
    z-index:    500;
    box-shadow: var(--aws-shadow);
}

#awsSidebar.collapsed .aws-nav-item:hover::after { opacity: 1; }

.aws-nav-item-icon {
    width:  32px;
    height: 32px;
    border-radius: var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   13px;
    flex-shrink: 0;
    color:       var(--aws-sidebar-icon);
    transition:  var(--aws-transition-sm);
}

.aws-nav-item:hover .aws-nav-item-icon {
    color: var(--aws-sidebar-text-active);
}

.aws-nav-item-text {
    font-size:   12px;
    font-weight: 700;
    color:  inherit;
    flex:   1;
    overflow:      hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s, width 0.25s;
    white-space: nowrap;
}

#awsSidebar.collapsed .aws-nav-item-text {
    opacity:        0;
    width:          0;
    pointer-events: none;
}

.aws-nav-badge {
    font-size:   9px;
    font-weight: 800;
    padding:       2px 7px;
    border-radius: var(--aws-radius-xl);
    background: var(--aws-border);
    color:      var(--aws-text);
    border: 1px solid var(--aws-border);
    flex-shrink: 0;
    transition:  opacity 0.2s;
    min-width: 22px;
    text-align: center;
}

.aws-nav-item.active .aws-nav-badge {
    background: rgba(255,255,255,0.2);
    color: var(--aws-sidebar-active-text);
    border-color: transparent;
}

#awsSidebar.collapsed .aws-nav-item-icon {
    margin: 0 auto;
}

#awsSidebar.collapsed .aws-nav-badge { opacity: 0; }

/* ══════════════════════════════════════════════════════════════
   5E. PLATFORM DIVIDER
══════════════════════════════════════════════════════════════ */
.aws-platform-divider {
    border:     none;
    border-top: 1px solid var(--aws-sidebar-border);
    margin:     8px 16px;
}

/* ══════════════════════════════════════════════════════════════
   5F. PLATFORM SECTIONS — DROPDOWN
══════════════════════════════════════════════════════════════ */
.aws-platform-section {
    margin: 1px 0;
}

.aws-platform-folder {
    width:       100%;
    display:     flex;
    align-items: center;
    gap:     9px;
    padding: 8px 10px;
    background: none;
    border:     none;
    color:       var(--aws-sidebar-text);
    font-size:   12px;
    font-weight: 700;
    cursor:      pointer;
    transition:  var(--aws-transition-sm);
    text-align:  left;
    white-space: nowrap;
    overflow:    hidden;
    border-radius: var(--aws-radius);
    margin: 0 8px;
    width: calc(100% - 16px);
}

.aws-platform-folder:hover {
    color:      var(--aws-sidebar-text-active);
    background: var(--aws-sidebar-hover);
}

.aws-platform-folder.open {
    color: var(--aws-sidebar-text-active);
}

.aws-platform-folder > i:first-child {
    font-size:   13px;
    width:       16px;
    flex-shrink: 0;
    text-align: center;
}

.aws-platform-folder .arrow {
    margin-left: auto;
    font-size:   9px;
    color:       var(--aws-sidebar-label);
    transition:  transform 0.22s cubic-bezier(0.4,0,0.2,1);
    flex-shrink: 0;
}

.aws-platform-folder.open .arrow {
    transform: rotate(180deg);
}

.aws-platform-submenu {
    display: none;
    padding: 2px 0 4px;
}

.aws-platform-submenu.open {
    display: block;
}

.aws-platform-link {
    display:     flex;
    align-items: center;
    gap:     8px;
    padding: 6px 10px 6px 36px;
    font-size:   11px;
    font-weight: 500;
    color:       var(--aws-sidebar-link);
    text-decoration: none;
    border-radius:   var(--aws-radius);
    margin:  1px 8px;
    transition: var(--aws-transition-sm);
    white-space: nowrap;
    overflow:    hidden;
}

.aws-platform-link:hover {
    background: var(--aws-sidebar-hover);
    color:      var(--aws-sidebar-text-active);
}

.aws-platform-link.active {
    color:      var(--aws-sidebar-text-active);
    background: var(--aws-sidebar-hover);
    font-weight: 700;
}

.aws-platform-link i {
    font-size:   11px;
    width:       14px;
    flex-shrink: 0;
    color:       inherit;
    text-align: center;
}

.aws-platform-link-badge {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: var(--aws-radius-xl);
    margin-left: auto;
    flex-shrink: 0;
    letter-spacing: .3px;
    background: var(--aws-border);
    color: var(--aws-text-dim);
}

#awsSidebar.collapsed .aws-platform-submenu { display: none !important; }

#awsSidebar.collapsed .aws-platform-folder {
    justify-content: center;
    padding: 8px 0;
    margin: 1px 6px;
}

#awsSidebar.collapsed .aws-platform-folder .aws-nav-item-text,
#awsSidebar.collapsed .aws-platform-folder .arrow {
    opacity:        0;
    width:          0;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   5G. NAV TOOL LINKS (Drive, IDE, MCP, Guide…)
══════════════════════════════════════════════════════════════ */
.aws-nav-tool-link {
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 8px 10px;
    margin:  1px 8px;
    border-radius:   var(--aws-radius);
    text-decoration: none;
    color:      var(--aws-sidebar-text);
    transition: var(--aws-transition-sm);
    white-space: nowrap;
    overflow:    hidden;
}

.aws-nav-tool-link:hover {
    background: var(--aws-sidebar-hover);
    color:      var(--aws-sidebar-text-active);
}

.aws-nav-tool-icon {
    width:  32px;
    height: 32px;
    border-radius: var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   13px;
    flex-shrink: 0;
    transition:  var(--aws-transition-sm);
    background: var(--aws-border);
    color: var(--aws-text-dim);
}

.aws-nav-tool-badge {
    font-size:   8px;
    font-weight: 800;
    padding:       2px 6px;
    border-radius: var(--aws-radius-xl);
    background: var(--aws-border);
    color:      var(--aws-text);
    border:     1px solid var(--aws-border);
    flex-shrink: 0;
    transition:  opacity 0.2s;
}

#awsSidebar.collapsed .aws-nav-tool-badge           { opacity: 0; }
#awsSidebar.collapsed .aws-nav-tool-link .aws-nav-item-text {
    opacity: 0; width: 0;
}
#awsSidebar.collapsed .aws-nav-tool-link {
    justify-content: center;
    padding: 8px 0;
}

.aws-workspace-guide-link {
    position: relative;
}

.aws-workspace-guide-link::before {
    content:    '';
    position:   absolute;
    left:       8px;
    top:        50%;
    transform:  translateY(-50%);
    width:      3px;
    height:     60%;
    background: var(--aws-ink);
    border-radius: 2px;
    opacity:    0;
    transition: opacity 0.2s;
}

.aws-workspace-guide-link:hover::before { opacity: 0.6; }

/* Nav tool icons (variantes colorées ramenées au monochrome) */
.aws-nav-tool-icon.avd-tool-teams,
.aws-nav-tool-icon.avd-tool-outlook,
.aws-nav-tool-icon.avd-tool-crm,
.aws-nav-tool-icon.avd-tool-dealroom,
.aws-nav-tool-icon.avd-tool-lp {
    background: var(--aws-border);
    color: var(--aws-text-dim);
}

/* ══════════════════════════════════════════════════════════════
   5H. STORAGE METER
══════════════════════════════════════════════════════════════ */
.aws-storage-meter {
    padding:  12px 14px;
    border-top: 1px solid var(--aws-sidebar-border);
    flex-shrink: 0;
}

.aws-storage-label {
    display:         flex;
    justify-content: space-between;
    font-size:   10px;
    color:       var(--aws-sidebar-label);
    margin-bottom: 7px;
    font-weight: 700;
}

.aws-storage-bar {
    height:        4px;
    background:    var(--aws-sidebar-border);
    border-radius: 4px;
    overflow:      hidden;
    margin-bottom: 5px;
}

.aws-storage-fill {
    height:        100%;
    background: var(--aws-ink);
    border-radius: 4px;
    transition:    width 0.6s ease;
}

.aws-storage-info {
    font-size:  9px;
    color:      var(--aws-sidebar-label);
    text-align: center;
}

#awsSidebar.collapsed .aws-storage-meter { display: none; }

/* ══════════════════════════════════════════════════════════════
   5I. SIDEBAR FOOTER (User)
══════════════════════════════════════════════════════════════ */
.aws-sidebar-footer {
    border-top: 1px solid var(--aws-sidebar-border);
    position:   relative;
    flex-shrink: 0;
}

.aws-sidebar-user-trigger {
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 12px 14px;
    cursor:     pointer;
    transition: var(--aws-transition-sm);
    overflow:   hidden;
}

.aws-sidebar-user-trigger:hover {
    background: var(--aws-sidebar-hover);
}

.aws-sidebar-user-trigger img {
    width:        34px;
    height:       34px;
    border-radius: 50%;
    object-fit:   cover;
    flex-shrink:  0;
}

.aws-sidebar-user-dropdown {
    position:      absolute;
    bottom:        100%;
    left:  8px;
    right: 8px;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    padding:    8px;
    box-shadow: var(--aws-shadow-lg);
    display:    none;
    z-index:    300;
}

.aws-sidebar-user-dropdown.open { display: block; }

.aws-sidebar-dropdown-header {
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--aws-border-soft, var(--aws-border));
    margin-bottom: 6px;
}

.aws-sidebar-dropdown-header img {
    width:        38px;
    height:       38px;
    border-radius: 50%;
    object-fit:   cover;
    flex-shrink:  0;
}

.aws-sidebar-dropdown-link {
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 8px 12px;
    font-size:   12px;
    font-weight: 600;
    color:       var(--aws-text-dim);
    text-decoration: none;
    border-radius:   var(--aws-radius);
    transition:  var(--aws-transition-sm);
}

.aws-sidebar-dropdown-link:hover {
    background: var(--aws-border);
    color:      var(--aws-text);
}

.aws-sidebar-dropdown-link i { width: 16px; font-size: 11px; text-align: center; }

.aws-sidebar-dropdown-logout {
    width:       100%;
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 8px 12px;
    background: none;
    border:     none;
    font-size:   12px;
    font-weight: 700;
    color:       var(--aws-red);
    cursor:      pointer;
    border-radius: var(--aws-radius);
    transition:  var(--aws-transition-sm);
    margin-top:  4px;
    border-top:  1px solid var(--aws-border);
    text-align: left;
}

.aws-sidebar-dropdown-logout:hover { background: var(--aws-red-bg); }
.aws-sidebar-dropdown-logout i      { width: 16px; font-size: 11px; text-align: center; }

#awsSidebar.collapsed .aws-sidebar-user-trigger {
    justify-content: center;
    padding: 10px 0;
}

#awsSidebar.collapsed .aws-sidebar-user-trigger > *:not(img) {
    display: none;
}

/* ══════════════════════════════════════════════════════════════
   5J. SIDEBAR TOGGLE BUTTON
══════════════════════════════════════════════════════════════ */
.aws-sidebar-toggle {
    position:  absolute;
    top:       50%;
    right:    -14px;
    transform: translateY(-50%);

    width:  26px;
    height: 26px;
    border-radius: 50%;

    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    display:         flex;
    align-items:     center;
    justify-content: center;
    cursor:     pointer;
    font-size:  9px;
    color:      var(--aws-text-dim);
    z-index:    300;
    transition: var(--aws-transition);
    box-shadow: var(--aws-shadow);
}

.aws-sidebar-toggle:hover {
    background:    var(--aws-ink);
    color:         var(--aws-bg);
    border-color:  var(--aws-ink);
}

/* ══════════════════════════════════════════════════════════════
   5K. MOBILE CLOSE BUTTON
══════════════════════════════════════════════════════════════ */
.aws-mobile-close-btn {
    display:  none;
    position: absolute;
    top:   12px;
    right: 12px;
    background:    var(--aws-border);
    border:        1px solid var(--aws-border);
    color:         var(--aws-text-dim);
    width:         28px;
    height:        28px;
    border-radius: var(--aws-radius);
    cursor:    pointer;
    font-size: 12px;
    z-index:   10;
    align-items:     center;
    justify-content: center;
    transition: var(--aws-transition);
}

.aws-mobile-close-btn:hover {
    background: var(--aws-red-bg);
    color:      var(--aws-red);
    border-color: var(--aws-red);
}

/* ══════════════════════════════════════════════════════════════
   6. HEADER
══════════════════════════════════════════════════════════════ */
#awsHeader {
    grid-column: 2 / -1;
    grid-row:    1;
    height:      var(--aws-header-h);
    background:  var(--aws-header-bg);
    border-bottom: 1px solid var(--aws-header-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display:     flex;
    align-items: center;
    gap:         10px;
    padding:     0 20px;
    position:    sticky;
    top:         0;
    z-index:     90;
    transition:  background 0.2s ease;
}

/* Breadcrumb */
.aws-breadcrumb {
    display:     flex;
    align-items: center;
    gap:         6px;
    flex-shrink: 0;
    max-width:   280px;
    overflow:    hidden;
}

.aws-breadcrumb-item {
    font-size:   12px;
    font-weight: 700;
    color:       var(--aws-text-dim);
    white-space: nowrap;
    transition:  color 0.15s;
    cursor:      pointer;
}

.aws-breadcrumb-item:hover  { color: var(--aws-text); }
.aws-breadcrumb-item.active { color: var(--aws-text); cursor: default; }

.aws-breadcrumb-sep {
    font-size:   9px;
    color:       var(--aws-text-muted);
    flex-shrink: 0;
}

/* Search */
.aws-search-wrap {
    flex:      1;
    max-width: 440px;
    position:  relative;
}

.aws-search-icon {
    position:  absolute;
    left:      12px;
    top:       50%;
    transform: translateY(-50%);
    color:     var(--aws-text-muted);
    font-size: 12px;
    pointer-events: none;
    transition: color 0.15s;
}

.aws-search-wrap.focused .aws-search-icon { color: var(--aws-text); }

.aws-search-input {
    width:       100%;
    background:  var(--aws-input-bg);
    border:      1px solid var(--aws-input-border);
    border-radius: var(--aws-radius);
    padding:     8px 36px 8px 34px;
    font-size:   12px;
    color:       var(--aws-text);
    font-family: inherit;
    outline:     none;
    transition:  var(--aws-transition);
}

.aws-search-input::placeholder { color: var(--aws-text-muted); }

.aws-search-input:focus {
    border-color: var(--aws-ink);
}

.aws-search-shortcut {
    position:  absolute;
    right:     10px;
    top:       50%;
    transform: translateY(-50%);
    font-size:   9px;
    color:       var(--aws-text-muted);
    background:  var(--aws-border);
    border:      1px solid var(--aws-border);
    padding:     2px 5px;
    border-radius: 4px;
    pointer-events: none;
    font-weight: 700;
}

.aws-search-clear {
    position:  absolute;
    right:     10px;
    top:       50%;
    transform: translateY(-50%);
    color:     var(--aws-text-muted);
    cursor:    pointer;
    font-size: 11px;
    padding:   4px;
    transition: color 0.15s;
}

.aws-search-clear:hover { color: var(--aws-red); }

/* Search Dropdown */
.aws-search-dropdown {
    position:      absolute;
    top:           calc(100% + 6px);
    left:  0;
    right: 0;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    box-shadow:    var(--aws-shadow-lg);
    z-index:  500;
    overflow: hidden;
    display:  none;
}

.aws-search-result-item {
    display:     flex;
    align-items: center;
    gap:         10px;
    padding:     10px 14px;
    cursor:      pointer;
    transition:  background 0.12s;
}

.aws-search-result-item:hover { background: var(--aws-border-soft, var(--aws-input-bg)); }

.aws-search-result-icon {
    width:  32px;
    height: 32px;
    border-radius: var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   13px;
    color:       var(--aws-bg);
    background: var(--aws-ink);
    flex-shrink: 0;
}

/* Header Controls */
.aws-header-controls {
    display:     flex;
    align-items: center;
    gap:         6px;
    margin-left: auto;
    flex-shrink: 0;
}

.aws-header-btn {
    display:     flex;
    align-items: center;
    gap:         6px;
    padding:     7px 12px;
    background:  var(--aws-border);
    border:      1px solid var(--aws-border);
    border-radius: var(--aws-radius);
    color:       var(--aws-text-dim);
    font-size:   12px;
    font-weight: 600;
    cursor:      pointer;
    transition:  var(--aws-transition-sm);
    white-space: nowrap;
    font-family: inherit;
}

.aws-header-btn:hover {
    border-color: var(--aws-ink-soft);
    color:        var(--aws-text);
}

#awdMobileMenuBtn { display: none; padding: 7px 10px; }

/* View toggle */
.aws-view-toggle {
    display:       flex;
    background: var(--aws-border);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius);
    overflow:      hidden;
}

.aws-view-btn {
    padding:    6px 10px;
    background: none;
    border:     none;
    color:      var(--aws-text-muted);
    font-size:  13px;
    cursor:     pointer;
    transition: var(--aws-transition-sm);
}

.aws-view-btn:hover  { background: var(--aws-card-hover); color: var(--aws-text); }
.aws-view-btn.active { background: var(--aws-ink); color: var(--aws-bg); }

/* Sort dropdown */
.aws-sort-wrap { position: relative; }

.aws-sort-dropdown {
    position:      absolute;
    right:         0;
    top:           calc(100% + 6px);
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    box-shadow:    var(--aws-shadow-lg);
    min-width:     190px;
    z-index:  500;
    padding:  6px;
    display:  none;
}

.aws-sort-dropdown.open            { display: block; }

.aws-sort-option {
    display:     flex;
    align-items: center;
    gap:     10px;
    padding: 9px 12px;
    font-size:   12px;
    font-weight: 600;
    color:       var(--aws-text-dim);
    border-radius: var(--aws-radius);
    cursor:      pointer;
    transition:  var(--aws-transition-sm);
}

.aws-sort-option:hover  { background: var(--aws-border); color: var(--aws-text); }
.aws-sort-option.active { color: var(--aws-text); background: var(--aws-border); font-weight: 700; }
.aws-sort-option i      { width: 14px; font-size: 12px; text-align: center; }

/* Theme toggle */
.aws-theme-toggle {
    width:         34px;
    height:        34px;
    border-radius: var(--aws-radius);
    background:    var(--aws-border);
    border:        1px solid var(--aws-border);
    color:         var(--aws-text-dim);
    font-size:     14px;
    cursor:        pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:  var(--aws-transition-sm);
}

.aws-theme-toggle:hover {
    border-color: var(--aws-ink-soft);
    color:        var(--aws-text);
}

/* Status dot */
.aws-status-dot {
    width:         8px;
    height:        8px;
    border-radius: 50%;
    background:    var(--aws-text-muted);
    flex-shrink:   0;
    transition:    var(--aws-transition);
}
.aws-status-dot.connected { background: var(--aws-text); box-shadow: none; animation: none; }

@keyframes aws-pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

/* User avatar */
.aws-user-avatar {
    width:         34px;
    height:        34px;
    border-radius: 50%;
    overflow:      hidden;
    cursor:        pointer;
    flex-shrink:   0;
    border:        2px solid var(--aws-border);
    transition:    border-color 0.2s;
}

.aws-user-avatar:hover { border-color: var(--aws-ink); }

.aws-user-avatar-fallback {
    width:           34px;
    height:          34px;
    border-radius:   50%;
    background:      var(--aws-ink);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   14px;
    font-weight: 800;
    color:       var(--aws-bg);
}

/* User menu */
#awsUserMenu {
    position:      fixed;
    right:         16px;
    top:           62px;
    z-index:       10000;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    padding:       8px;
    min-width:     210px;
    box-shadow:    var(--aws-shadow-lg);
    animation:     aws-ctx-appear 0.15s ease;
}

body.light-mode #awsUserMenu{
    background:#f8fafc !important;
    border:1px solid rgba(15,23,42,0.08) !important;
    box-shadow:0 20px 60px rgba(15,23,42,0.12) !important;
}
body.light-mode #awsUserMenu #avdMenuUserName{ color:#0f172a !important; }
body.light-mode #awsUserMenu #avdMenuUserEmail{ color:#64748b !important; }
body.light-mode #awsUserMenu .aws-ctx-item{ color:#334155 !important; }
body.light-mode #awsUserMenu .aws-ctx-item:hover{ background:rgba(15,23,42,0.05) !important; }
body.light-mode #awsUserMenu .aws-ctx-item.danger{ color:#dc2626 !important; }
body.light-mode #awsUserMenu hr{ border-top-color:rgba(15,23,42,0.08) !important; }

/* ══════════════════════════════════════════════════════════════
   7. MAIN CONTENT AREA
══════════════════════════════════════════════════════════════ */
#awsMain {
    grid-column: 2;
    grid-row:    2;
    overflow-y:  auto;
    overflow-x:  hidden;
    padding:     24px;
    transition:  var(--aws-transition);
    min-height:  0;
    background:  var(--aws-bg);
    position: relative;
    z-index: 1;
}

#awsMain::-webkit-scrollbar       { width: 5px; }
#awsMain::-webkit-scrollbar-track { background: transparent; }
#awsMain::-webkit-scrollbar-thumb {
    background:    var(--aws-border);
    border-radius: 4px;
}

.aws-view        { display: none; }
.aws-view.active { display: block; }

/* Section titles */
.aws-section-title {
    display:        flex;
    align-items:    center;
    gap:            8px;
    font-size:      11px;
    font-weight:    800;
    color:          var(--aws-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom:  14px;
    margin-top:     28px;
}

.aws-section-title:first-child { margin-top: 0; }
.aws-section-title i           { font-size: 11px; color: var(--aws-text-muted); }

/* ══════════════════════════════════════════════════════════════
   8. HOME HERO
══════════════════════════════════════════════════════════════ */
.aws-home-hero {
    background: var(--aws-border);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-xl);
    padding:       28px 32px;
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    gap:           24px;
    margin-bottom: 20px;
    position:      relative;
    overflow:      hidden;
}

.aws-home-hero::before { content: none; }

.aws-home-hero-text h2 {
    font-size:     22px;
    font-weight:   900;
    color:         var(--aws-text);
    margin-bottom: 7px;
    line-height:   1.3;
    letter-spacing: -0.01em;
}

.aws-home-hero-text p {
    font-size:   13px;
    color:       var(--aws-text-dim);
    line-height: 1.6;
}

.aws-home-hero-actions {
    display:     flex;
    gap:         10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   9. STATS GRID
══════════════════════════════════════════════════════════════ */
.aws-stats-grid {
    display:               grid;
    grid-template-columns: repeat(4,1fr);
    gap:           14px;
    margin-bottom: 20px;
}

.aws-stat-card {
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    padding:       16px 18px;
    display:       flex;
    align-items:   center;
    gap:           14px;
    transition:    var(--aws-transition);
    box-shadow:    var(--aws-shadow-card);
}

.aws-stat-card:hover {
    border-color: var(--aws-ink-soft);
}

.aws-stat-icon {
    width:           44px;
    height:          44px;
    border-radius:   var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   18px;
    flex-shrink: 0;
    background: var(--aws-border);
    color: var(--aws-text);
}

.aws-stat-value {
    font-size:     22px;
    font-weight:   900;
    color:         var(--aws-text);
    line-height:   1;
    margin-bottom: 2px;
}

.aws-stat-label {
    font-size:      10px;
    font-weight:    700;
    color:          var(--aws-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ══════════════════════════════════════════════════════════════
   10. SHORTCUTS BAR
══════════════════════════════════════════════════════════════ */
.aws-shortcuts {
    display:       flex;
    gap:           8px;
    margin-bottom: 20px;
    flex-wrap:     wrap;
}

.aws-shortcut {
    display:       flex;
    align-items:   center;
    gap:           7px;
    padding:       7px 14px;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-xl);
    font-size:     12px;
    font-weight:   700;
    color:         var(--aws-text-dim);
    cursor:        pointer;
    transition:    var(--aws-transition-sm);
    box-shadow:    var(--aws-shadow-card);
    user-select:   none;
}

.aws-shortcut:hover {
    color:        var(--aws-text);
    border-color: var(--aws-ink-soft);
}

/* ══════════════════════════════════════════════════════════════
   11. MCP SECTION
══════════════════════════════════════════════════════════════ */
.aws-mcp-section {
    position: relative;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    padding:       14px 18px;
    margin-bottom: 20px;
    box-shadow:    var(--aws-shadow-card);
    overflow: hidden;
}

.aws-mcp-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--aws-ink);
    opacity: 0.4;
    pointer-events: none;
}

.aws-mcp-header-row {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   10px;
}

.aws-mcp-badge {
    display:     flex;
    align-items: center;
    gap:         8px;
    font-size:   10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color:       var(--aws-text);
}

.aws-mcp-badge-logo {
    width:      15px;
    height:     15px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.9;
}

.aws-mcp-open-link {
    display:     flex;
    align-items: center;
    gap:         5px;
    font-size:   10px;
    font-weight: 700;
    color:       var(--aws-text);
    text-decoration: none;
    opacity:    0.8;
    transition: opacity 0.15s;
    padding: 4px 10px;
    background: var(--aws-border);
    border: 1px solid var(--aws-border);
    border-radius: var(--aws-radius);
}

.aws-mcp-open-link:hover { opacity: 1; border-color: var(--aws-ink-soft); }

.aws-mcp-input-row {
    display:       flex;
    align-items:   center;
    gap:           8px;
    background:    var(--aws-input-bg);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius);
    padding:       0 10px 0 12px;
    margin-bottom: 10px;
    transition:    var(--aws-transition);
}

.aws-mcp-input-row:focus-within {
    border-color: var(--aws-ink);
}

.aws-mcp-input-icon {
    color:       var(--aws-text-faint, var(--aws-text-muted));
    font-size:   11px;
    flex-shrink: 0;
}

.aws-mcp-input {
    flex:        1;
    background:  none;
    border:      none;
    outline:     none;
    font-size:   12px;
    color:       var(--aws-text);
    font-family: inherit;
    padding: 9px 0;
}

.aws-mcp-input::placeholder { color: var(--aws-text-muted); }

.aws-mcp-send {
    width:         28px;
    height:        28px;
    border-radius: var(--aws-radius);
    background:    var(--aws-ink);
    border:        none;
    color:         var(--aws-bg);
    font-size:     11px;
    cursor:        pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:  var(--aws-transition-sm);
    flex-shrink: 0;
}

.aws-mcp-send:hover { opacity: 0.85; }

.aws-mcp-chips {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
}

.aws-mcp-chip {
    display:       flex;
    align-items:   center;
    gap:           5px;
    padding:       4px 10px;
    background:    var(--aws-border);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-xl);
    font-size:     10px;
    font-weight:   700;
    color:         var(--aws-text-dim);
    cursor:        pointer;
    transition:    var(--aws-transition-sm);
    font-family:   inherit;
    white-space:   nowrap;
}

.aws-mcp-chip:hover {
    color: var(--aws-text);
    border-color: var(--aws-ink-soft);
}

/* ══════════════════════════════════════════════════════════════
   12. ACTIVITY FEED
══════════════════════════════════════════════════════════════ */
.aws-activity-feed {
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    overflow:      hidden;
    box-shadow:    var(--aws-shadow-card);
}

.aws-activity-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         14px 16px;
    border-bottom:   1px solid var(--aws-border);
    font-size:       12px;
    font-weight:     800;
    color:           var(--aws-text);
}

.aws-activity-item {
    display:     flex;
    align-items: center;
    gap:         12px;
    padding:     11px 16px;
    border-bottom: 1px solid var(--aws-border);
    cursor:      pointer;
    transition:  var(--aws-transition-sm);
}

.aws-activity-item:last-child    { border-bottom: none; }
.aws-activity-item:hover         { background: var(--aws-border); }

.aws-activity-icon {
    width:           34px;
    height:          34px;
    border-radius:   var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   14px;
    flex-shrink: 0;
    background: var(--aws-border);
    color: var(--aws-text);
}

.aws-activity-info   { flex: 1; min-width: 0; }

.aws-activity-name {
    font-size:     12px;
    font-weight:   700;
    color:         var(--aws-text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.aws-activity-sub {
    font-size: 10px;
    color:     var(--aws-text-dim);
}

.aws-activity-badge {
    font-size:     9px;
    font-weight:   800;
    padding:       3px 8px;
    border-radius: var(--aws-radius-xl);
    flex-shrink:   0;
    background: var(--aws-border);
    color: var(--aws-text);
}

/* ══════════════════════════════════════════════════════════════
   13. SPINNER & SKELETON
══════════════════════════════════════════════════════════════ */
.aws-spinner {
    display:     flex;
    align-items: center;
    gap:         10px;
    color:       var(--aws-text-dim);
    font-size:   12px;
    justify-content: center;
    padding:     20px;
}

.aws-ring {
    display:       inline-block;
    width:         18px;
    height:        18px;
    border:        1.5px solid var(--aws-border);
    border-top-color: var(--aws-ink);
    border-radius: 50%;
    animation:     aws-spin 0.75s linear infinite;
    flex-shrink:   0;
}

@keyframes aws-spin { to { transform: rotate(360deg); } }

.aws-skeleton {
    background: linear-gradient(
        90deg,
        var(--aws-border) 25%,
        var(--aws-card-hover)   50%,
        var(--aws-border) 75%
    );
    background-size: 200% 100%;
    animation:       aws-shimmer 1.5s infinite;
    border-radius:   var(--aws-radius-lg);
}

@keyframes aws-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position:  -200% 0; }
}

.aws-skeleton-card {
    height:        120px;
    border-radius: var(--aws-radius-lg);
}

/* ══════════════════════════════════════════════════════════════
   14. MOBILE BACKDROP
══════════════════════════════════════════════════════════════ */
.aws-mobile-backdrop {
    display:    none;
    position:   fixed;
    inset:      0;
    background: rgba(0,0,0,0.5);
    z-index:    400;
}

/* ══════════════════════════════════════════════════════════════
   15. QUICK CARDS (home recent / favorites)
══════════════════════════════════════════════════════════════ */
.aws-quick-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap:           10px;
    margin-bottom: 4px;
}

.aws-quick-card {
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    overflow:      hidden;
    cursor:        pointer;
    transition:    var(--aws-transition);
    position:      relative;
    display:       flex;
    align-items:   center;
    gap:           10px;
    padding:       10px 12px;
    box-shadow:    var(--aws-shadow-card);
}

.aws-quick-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: var(--aws-border);
}

.aws-quick-card:hover {
    border-color: var(--aws-ink-soft);
    transform:    translateY(-3px);
}

.aws-quick-card:hover::before { opacity: 0.4; }

.aws-quick-card-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   16px;
    color:       var(--aws-bg);
    background: var(--aws-ink);
    position:    relative;
    z-index: 1;
    flex-shrink: 0;
}

.aws-quick-card-new {
    position:      absolute;
    top:           -3px;
    right:         -3px;
    font-size:     7px;
    font-weight:   900;
    padding:       1px 5px;
    border-radius: 10px;
    background:    var(--aws-ink);
    color:         var(--aws-bg);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aws-quick-card-info { flex: 1; min-width: 0; position: relative; z-index: 1; }

.aws-quick-card-name {
    font-size:     12px;
    font-weight:   700;
    color:         var(--aws-text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.aws-quick-card-cat {
    font-size:      10px;
    color:          var(--aws-text-dim);
    white-space:    nowrap;
    overflow:       hidden;
    text-overflow:  ellipsis;
}

.aws-quick-card-fav {
    background: none;
    border: none;
    color: var(--aws-text-dim);
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--aws-radius);
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.aws-quick-card-fav:hover,
.aws-quick-card-fav.active {
    color:      var(--aws-text);
    transform:  scale(1.15);
}

/* ══════════════════════════════════════════════════════════════
   16. CATEGORY CARDS (home browse section)
══════════════════════════════════════════════════════════════ */
.aws-category-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
    gap:           14px;
    margin-bottom: 4px;
}

.aws-cat-card {
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    padding:       18px;
    cursor:        pointer;
    transition:    var(--aws-transition);
    display:       flex;
    flex-direction: column;
    gap:           14px;
    position:      relative;
    overflow:      hidden;
    box-shadow:    var(--aws-shadow-card);
}

.aws-cat-card::before {
    content:   '';
    position:  absolute;
    top:       0;
    left:      0;
    right:     0;
    height:    2px;
    background: var(--aws-ink);
    opacity:    0;
    transition: opacity 0.2s;
}

.aws-cat-card:hover {
    border-color: var(--aws-ink-soft);
    transform:    translateY(-3px);
}

.aws-cat-card:hover::before { opacity: 0.4; }

.aws-cat-card-header {
    display:     flex;
    align-items: flex-start;
    gap:         12px;
}

.aws-cat-card-icon {
    width:           42px;
    height:          42px;
    border-radius:   var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   18px;
    flex-shrink: 0;
    transition:  var(--aws-transition-sm);
    background: var(--aws-border);
    color: var(--aws-text);
}

.aws-cat-card:hover .aws-cat-card-icon { transform: scale(1.08); }

.aws-cat-card-title {
    font-size:     13px;
    font-weight:   800;
    color:         var(--aws-text);
    margin-bottom: 3px;
}

.aws-cat-card-desc {
    font-size:   10px;
    color:       var(--aws-text-dim);
    line-height: 1.5;
    font-weight: 500;
}

.aws-cat-new-badge {
    font-size:     9px;
    font-weight:   800;
    padding:       3px 8px;
    border-radius: var(--aws-radius-xl);
    background:    var(--aws-border);
    color:         var(--aws-text);
    border:        1px solid var(--aws-border);
    flex-shrink:   0;
    white-space:   nowrap;
}

.aws-cat-card-apps {
    display:   flex;
    flex-wrap: wrap;
    gap:       6px;
}

.aws-cat-card-app-chip {
    display:       flex;
    align-items:   center;
    gap:           5px;
    padding:       4px 9px;
    background:    var(--aws-input-bg);
    border:        1px solid var(--aws-input-border);
    border-radius: var(--aws-radius);
    font-size:     10px;
    font-weight:   600;
    color:         var(--aws-text-dim);
    cursor:        pointer;
    transition:    var(--aws-transition-sm);
    user-select:   none;
}

.aws-cat-card-app-chip:hover {
    color:        var(--aws-text);
    border-color: var(--aws-ink-soft);
}

.aws-cat-card-app-chip.more {
    color:       var(--aws-text-muted);
    cursor:      default;
    background:  var(--aws-input-bg);
}

.aws-cat-card-footer {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding-top:     10px;
    border-top:      1px solid var(--aws-border);
    font-size:       11px;
}

/* ══════════════════════════════════════════════════════════════
   17. APP CARDS (grid mode)
══════════════════════════════════════════════════════════════ */
.aws-app-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
    gap: 16px;
}

.aws-app-card {
    background:     var(--aws-card);
    border:         1px solid var(--aws-border);
    border-radius:  var(--aws-radius-lg);
    overflow:       hidden;
    cursor:         pointer;
    transition:     var(--aws-transition);
    display:        flex;
    flex-direction: column;
    position:       relative;
    box-shadow:     var(--aws-shadow-card);
}

.aws-app-card:hover {
    border-color: var(--aws-ink-soft);
    transform:    translateY(-4px);
}

.aws-app-card.selected {
    border-color: var(--aws-ink);
    background: var(--aws-border);
}

.aws-app-card-header {
    height:          88px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    position:        relative;
    overflow:        hidden;
    flex-shrink:     0;
    background: var(--aws-border);
}

.aws-app-card-header::after {
    content: none;
}

.aws-app-card:hover .aws-app-card-icon {
    transform: scale(1.1) translateY(-2px);
}

.aws-app-new-badge {
    position:        absolute;
    top:             8px;
    right:           8px;
    font-size:       8px;
    font-weight:     800;
    padding:         3px 8px;
    border-radius:   var(--aws-radius-xl);
    background:      var(--aws-ink);
    color:           var(--aws-bg);
    z-index:         2;
    letter-spacing:  0.3px;
    text-transform: uppercase;
}

.aws-app-new-badge--inline {
    position:      static;
    display:       inline-flex;
    align-items:   center;
    margin-left:   6px;
    font-size:     8px;
    font-weight:   800;
    padding:       2px 6px;
    border-radius: var(--aws-radius-xl);
    background:    var(--aws-border);
    color:         var(--aws-text);
    border:        1px solid var(--aws-border);
    vertical-align: middle;
}

.aws-app-fav-btn {
    top: 10px;
    left: 10px;
    right: auto;
}

.aws-app-card:hover .aws-app-fav-btn { opacity: 1; }

.aws-app-fav-btn:hover,
.aws-app-fav-btn.active {
    color:      var(--aws-text);
    background: var(--aws-card);
    opacity:    1 !important;
}

.aws-app-open-btn {
    position:        absolute;
    bottom:          8px;
    right:           8px;
    width:           26px;
    height:          26px;
    border-radius:   var(--aws-radius);
    background:      rgba(0,0,0,0.25);
    border:          none;
    color:           rgba(255,255,255,0.8);
    font-size:       10px;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    z-index:         2;
    transition:      var(--aws-transition-sm);
    opacity:         0;
}

.aws-app-card:hover .aws-app-open-btn { opacity: 1; }
.aws-app-open-btn:hover { background: rgba(0,0,0,0.45); color: #fff; }

.aws-app-fav-btn,
.aws-app-open-btn {
    position: absolute;
    z-index: 5;
    width: 30px;
    height: 30px;
    border-radius: var(--aws-radius);
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.28);
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.aws-app-card-body {
    padding:        13px 14px 10px;
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            4px;
}

.aws-app-card-name {
    font-size:     13px;
    font-weight:   800;
    color:         var(--aws-text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.aws-app-card-cat {
    font-size:   10px;
    color:       var(--aws-text-dim);
    font-weight: 600;
}

.aws-app-card-desc {
    font-size:    11px;
    color:        var(--aws-text-dim);
    line-height:  1.5;
    margin-top:   3px;
    flex:         1;
    display:      -webkit-box;
    -webkit-line-clamp:  2;
    -webkit-box-orient:  vertical;
    overflow:     hidden;
}

.aws-app-card-features {
    display:        flex;
    flex-direction: column;
    gap:            3px;
    margin-top:     5px;
}

.aws-app-feature-chip {
    display:     flex;
    align-items: center;
    gap:         5px;
    font-size:   10px;
    color:       var(--aws-text-dim);
    font-weight: 500;
}

.aws-app-card-footer {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         9px 14px 12px;
    border-top:      1px solid var(--aws-border);
}

.aws-app-badge {
    font-size:      9px;
    font-weight:    800;
    padding:        3px 8px;
    border-radius:  var(--aws-radius-xl);
    letter-spacing: 0.3px;
    white-space:    nowrap;
    background: var(--aws-border);
    color: var(--aws-text-dim);
    border: 1px solid var(--aws-border);
}

.aws-app-card-cta {
    display:     flex;
    align-items: center;
    gap:         4px;
    padding:     6px 12px;
    border:      1px solid var(--aws-border);
    border-radius: var(--aws-radius);
    font-size:   11px;
    font-weight: 700;
    color:       var(--aws-bg);
    background: var(--aws-ink);
    cursor:      pointer;
    transition:  var(--aws-transition-sm);
    font-family: inherit;
}

.aws-app-card-cta:hover {
    opacity:   0.85;
}

/* ══════════════════════════════════════════════════════════════
   18. APP LIST MODE (rows)
══════════════════════════════════════════════════════════════ */
.aws-app-list {
    display:        flex;
    flex-direction: column;
    gap:            6px;
}

.aws-app-row {
    display:               grid;
    grid-template-columns: 44px 1fr 160px 80px 160px;
    align-items: center;
    gap:         14px;
    padding:     11px 16px;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    cursor:     pointer;
    transition: var(--aws-transition-sm);
    box-shadow: var(--aws-shadow-card);
}

.aws-app-row:hover {
    border-color: var(--aws-ink-soft);
    background:   var(--aws-card-hover);
}

.aws-app-row.selected {
    border-color: var(--aws-ink);
    background:   var(--aws-border);
}

.aws-app-row-icon {
    width:           38px;
    height:          38px;
    border-radius:   var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   16px;
    color:       var(--aws-bg);
    background: var(--aws-ink);
    flex-shrink: 0;
    transition:  transform 0.2s;
}

.aws-app-row:hover .aws-app-row-icon { transform: scale(1.06); }

.aws-app-row-main { min-width: 0; }

.aws-app-row-name {
    font-size:     13px;
    font-weight:   700;
    color:         var(--aws-text);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
    display:       flex;
    align-items:   center;
    gap:           4px;
    margin-bottom: 3px;
}

.aws-app-row-desc {
    font-size:     11px;
    color:         var(--aws-text-dim);
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.aws-app-row-cell {
    font-size:   11px;
    color:       var(--aws-text-dim);
    display:     flex;
    align-items: center;
}

.aws-app-cat-badge {
    display:       inline-flex;
    align-items:   center;
    gap:           4px;
    font-size:     10px;
    font-weight:   700;
    padding:       3px 9px;
    border-radius: var(--aws-radius-xl);
    white-space:   nowrap;
    background: var(--aws-border);
    color: var(--aws-text-dim);
}

.aws-app-row-actions {
    display:         flex;
    align-items:     center;
    gap:             4px;
    justify-content: flex-end;
}

.aws-app-row-btn {
    display:       flex;
    align-items:   center;
    gap:           4px;
    padding:       5px 8px;
    background:    var(--aws-border);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius);
    font-size:     11px;
    color:         var(--aws-text-dim);
    cursor:        pointer;
    transition:    var(--aws-transition-sm);
    font-family:   inherit;
    white-space:   nowrap;
}

.aws-app-row-btn:hover {
    color:        var(--aws-text);
    border-color: var(--aws-ink-soft);
}

.aws-app-row-btn.active { color: var(--aws-text); }

.aws-app-row-btn.primary {
    background:   var(--aws-ink);
    color:        var(--aws-bg);
    border-color: var(--aws-ink);
    font-weight:  700;
}

.aws-app-row-btn.primary:hover {
    opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════════
   19. CATEGORY SECTION HEADERS
══════════════════════════════════════════════════════════════ */
.aws-category-section { margin-bottom: 36px; }

.aws-cat-section-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   14px;
    padding-bottom:  10px;
    border-bottom:   1px solid var(--aws-border);
    flex-wrap:       wrap;
    gap:             8px;
}

.aws-cat-section-title {
    display:     flex;
    align-items: center;
    gap:         8px;
    font-size:   13px;
    font-weight: 800;
    color:       var(--aws-text);
}

.aws-cat-section-dot {
    width:         8px;
    height:        8px;
    border-radius: 50%;
    flex-shrink:   0;
    background: var(--aws-ink);
}

.aws-cat-section-count {
    font-size:   11px;
    font-weight: 600;
    color:       var(--aws-text-dim);
}

.aws-cat-section-desc {
    font-size:   11px;
    color:       var(--aws-text-dim);
    font-weight: 500;
}

/* Single category hero */
.aws-cat-hero {
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-xl);
    padding:       24px 28px;
    margin-bottom: 22px;
    position:      relative;
    overflow:      hidden;
    box-shadow:    var(--aws-shadow-card);
    background: var(--aws-card);
}

.aws-cat-hero-inner {
    display:     flex;
    align-items: center;
    gap:         18px;
    flex-wrap:   wrap;
}

.aws-cat-hero-icon {
    width:           56px;
    height:          56px;
    border-radius:   var(--aws-radius-lg);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   24px;
    flex-shrink: 0;
    background: var(--aws-border);
    color: var(--aws-text);
}

.aws-cat-hero-title {
    font-size:     20px;
    font-weight:   900;
    color:         var(--aws-text);
    margin-bottom: 4px;
}

.aws-cat-hero-desc {
    font-size: 13px;
    color:     var(--aws-text-dim);
}

.aws-cat-hero-stats {
    display:     flex;
    gap:         28px;
    margin-left: auto;
    flex-shrink: 0;
}

.aws-cat-hero-stat { text-align: center; }

.aws-cat-hero-stat-val {
    font-size:     28px;
    font-weight:   900;
    line-height:   1;
    margin-bottom: 3px;
    color: var(--aws-text);
}

.aws-cat-hero-stat-lbl {
    font-size:      10px;
    font-weight:    700;
    color:          var(--aws-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aws-cat-hero-back {
    display:       inline-flex;
    align-items:   center;
    gap:           6px;
    padding:       6px 12px;
    background:    var(--aws-border);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius);
    font-size:     11px;
    font-weight:   600;
    color:         var(--aws-text-dim);
    cursor:        pointer;
    transition:    var(--aws-transition-sm);
    font-family:   inherit;
    margin-bottom: 16px;
}

.aws-cat-hero-back:hover {
    color:        var(--aws-text);
    border-color: var(--aws-ink-soft);
}

/* ══════════════════════════════════════════════════════════════
   20. DETAILS PANEL
══════════════════════════════════════════════════════════════ */
#awsDetailsPanel {
    background:    var(--aws-sidebar-bg);
    border-left:   1px solid var(--aws-border);
    display:       flex;
    flex-direction: column;
    overflow:      hidden;
    transform:     translateX(100%);
    transition:    transform 0.25s cubic-bezier(0.4,0,0.2,1);
    position:      fixed;
    right:  0;
    top:    0;
    bottom: 0;
    width:     var(--aws-panel-w);
    z-index:   200;
    box-shadow: var(--aws-shadow-lg);
}

body.light-mode #awsDetailsPanel {
    box-shadow: -2px 0 20px rgba(0,0,0,0.05);
}

#awsDetailsPanel.open { transform: translateX(0); }

.aws-panel-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         15px 20px;
    border-bottom:   1px solid var(--aws-border);
    flex-shrink:     0;
}

.aws-panel-title {
    font-size:   13px;
    font-weight: 800;
    color:       var(--aws-text);
    display:     flex;
    align-items: center;
    gap:         8px;
}

.aws-panel-close {
    width:           28px;
    height:          28px;
    border-radius:   var(--aws-radius);
    background:      var(--aws-border);
    border:          1px solid var(--aws-border);
    color:           var(--aws-text-dim);
    font-size:       11px;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      var(--aws-transition-sm);
}

.aws-panel-close:hover {
    background:   var(--aws-red-bg);
    color:        var(--aws-red);
    border-color: var(--aws-red);
}

.aws-panel-body {
    flex:       1;
    overflow-y: auto;
    overflow-x: hidden;
}

.aws-panel-body::-webkit-scrollbar       { width: 3px; }
.aws-panel-body::-webkit-scrollbar-track { background: transparent; }
.aws-panel-body::-webkit-scrollbar-thumb {
    background:    var(--aws-border);
    border-radius: 4px;
}

.aws-panel-thumb {
    height:          100px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       42px;
    color:           var(--aws-text);
    position:        relative;
    overflow:        hidden;
    flex-shrink:     0;
    background: var(--aws-border);
}

.aws-panel-thumb::after { content: none; }

.aws-panel-section-title {
    font-size:      10px;
    font-weight:    800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color:          var(--aws-text-dim);
    margin-bottom:  10px;
}

.aws-panel-info-row {
    display:         flex;
    align-items:     flex-start;
    justify-content: space-between;
    gap:             8px;
    padding:         8px 0;
    border-bottom:   1px solid var(--aws-border);
    font-size:       11px;
}

.aws-panel-info-row:last-child { border-bottom: none; }

.aws-panel-label {
    color:       var(--aws-text-dim);
    font-weight: 600;
    flex-shrink: 0;
}

.aws-panel-value {
    color:      var(--aws-text);
    font-weight: 600;
    text-align:  right;
    word-break:  break-word;
}

/* ══════════════════════════════════════════════════════════════
   21. BUTTONS
══════════════════════════════════════════════════════════════ */
.aws-btn {
    display:     inline-flex;
    align-items: center;
    gap:         7px;
    padding:     9px 18px;
    border-radius: var(--aws-radius);
    font-size:   12px;
    font-weight: 700;
    cursor:      pointer;
    border:      1px solid transparent;
    transition:  var(--aws-transition-sm);
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
}

.aws-btn:disabled {
    opacity:   0.5;
    cursor:    not-allowed;
    transform: none !important;
}

.aws-btn-primary {
    background: var(--aws-ink);
    color:      var(--aws-bg);
}

.aws-btn-primary:hover {
    opacity:    0.85;
}

.aws-btn-secondary {
    background: var(--aws-border);
    border:     1px solid var(--aws-border);
    color:      var(--aws-text-dim);
}

.aws-btn-secondary:hover {
    color:        var(--aws-text);
    border-color: var(--aws-ink-soft);
}

.aws-btn-secondary.active {
    background:   var(--aws-border);
    color:        var(--aws-text);
    border-color: var(--aws-ink-soft);
}

.aws-btn-ghost {
    background: none;
    border:     none;
    color:      var(--aws-text-dim);
    padding:    5px 10px;
}

.aws-btn-ghost:hover {
    color:         var(--aws-text);
    background:    var(--aws-border);
    border-radius: var(--aws-radius);
}

.aws-btn-sm { padding: 5px 12px; font-size: 11px; border-radius: var(--aws-radius); }

.aws-btn-fav-active { color: var(--aws-text) !important; }

/* ══════════════════════════════════════════════════════════════
   22. CONTEXT MENU
══════════════════════════════════════════════════════════════ */
.aws-context-menu {
    position:      fixed;
    background:    var(--aws-card);
    border:        1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    box-shadow:    var(--aws-shadow-lg);
    min-width:     200px;
    padding:       6px;
    z-index:       20000;
    animation:     aws-ctx-appear 0.12s ease;
    overflow:      hidden;
}

@keyframes aws-ctx-appear {
    from { opacity: 0; transform: scale(0.94) translateY(-4px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.aws-ctx-header {
    display:     flex;
    align-items: center;
    gap:         10px;
    padding:     8px 10px 6px;
}

.aws-ctx-header-icon {
    width:           30px;
    height:          30px;
    border-radius:   var(--aws-radius);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:   13px;
    color:       var(--aws-bg);
    background: var(--aws-ink);
    flex-shrink: 0;
}

.aws-ctx-item {
    display:       flex;
    align-items:   center;
    gap:           10px;
    padding:       9px 12px;
    font-size:     12px;
    font-weight:   600;
    color:         var(--aws-text-dim);
    border-radius: var(--aws-radius);
    cursor:        pointer;
    transition:    var(--aws-transition-sm);
    user-select:   none;
}

.aws-ctx-item:hover {
    background: var(--aws-border);
    color:      var(--aws-text);
}

.aws-ctx-item.danger        { color: var(--aws-red); }
.aws-ctx-item.danger:hover  { background: var(--aws-red-bg); }
.aws-ctx-item i { width: 14px; font-size: 12px; flex-shrink: 0; text-align: center; }

/* ══════════════════════════════════════════════════════════════
   23. EMPTY STATES
══════════════════════════════════════════════════════════════ */
.aws-empty {
    text-align: center;
    padding:    48px 24px;
}

.aws-empty-icon {
    font-size:    40px;
    color:        var(--aws-text-faint, var(--aws-text-muted));
    display:      block;
    margin:       0 auto 14px;
    opacity:      0.5;
}

.aws-empty-title {
    font-size:     15px;
    font-weight:   800;
    color:         var(--aws-text-dim);
    margin-bottom: 6px;
}

.aws-empty-sub {
    font-size:     12px;
    color:         var(--aws-text-faint, var(--aws-text-muted));
    margin-bottom: 20px;
    line-height:   1.5;
    max-width:     320px;
    margin-left:   auto;
    margin-right:  auto;
}

/* ══════════════════════════════════════════════════════════════
   24. TEAM VIEW
══════════════════════════════════════════════════════════════ */
.aws-team-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
    gap:           16px;
    margin-bottom: 28px;
}

.aws-team-cta-btn {
    display:       inline-flex;
    align-items:   center;
    gap:           8px;
    padding:       11px 22px;
    border-radius: var(--aws-radius-lg);
    font-size:     13px;
    font-weight:   700;
    color:         var(--aws-bg);
    background: var(--aws-ink);
    text-decoration: none;
    transition:    var(--aws-transition);
}

.aws-team-cta-btn:hover {
    opacity:    0.9;
    transform:  translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════
   25. VIEW ANIMATIONS
══════════════════════════════════════════════════════════════ */
.aws-view.active {
    animation: aws-fade-in 0.2s ease;
}

@keyframes aws-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   26. UTILITY
══════════════════════════════════════════════════════════════ */
.aws-admin-only { display: none; }

/* ══════════════════════════════════════════════════════════════
   27. SCROLLBARS (global)
══════════════════════════════════════════════════════════════ */
* { scrollbar-width: thin; scrollbar-color: var(--aws-border) transparent; }
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-thumb { background: var(--aws-border); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--aws-text-muted); }

/* ══════════════════════════════════════════════════════════════
   28. LIGHT MODE GLOBAL ADJUSTMENTS
══════════════════════════════════════════════════════════════ */
body.light-mode .aws-app-card,
body.light-mode .aws-cat-card,
body.light-mode .aws-app-row,
body.light-mode .aws-activity-feed,
body.light-mode .aws-quick-card,
body.light-mode .aws-stat-card { box-shadow: var(--aws-shadow); }

/* ══════════════════════════════════════════════════════════════
   29. RESPONSIVE — TABLETTE (≤ 1200px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {

    .aws-stats-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 10px;
    }

    .aws-app-grid {
        grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
    }

    .aws-cat-hero-stats { display: none; }

    .aws-app-row {
        grid-template-columns: 40px 1fr 130px 120px;
    }

    .aws-app-row-cell:nth-child(4) { display: none; }

    .aws-breadcrumb { max-width: 200px; }
}

/* ══════════════════════════════════════════════════════════════
   30. RESPONSIVE — MOBILE (≤ 900px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

    #awsApp {
        grid-template-columns: 1fr;
        grid-template-rows:    var(--aws-header-h) 1fr;
    }

    #awsHeader { grid-column: 1; }
    #awsMain   { grid-column: 1; padding: 16px; }

    #awsSidebar {
        position:   fixed;
        left:       -280px;
        top:        0;
        bottom:     0;
        width:      260px !important;
        z-index:    500;
        transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
        box-shadow: none;
        overflow:   visible;
    }

    #awsSidebar.mobile-open {
        left:       0;
        box-shadow: var(--aws-shadow-lg);
    }

    #awsSidebar.collapsed {
        width: 260px !important;
    }

    .aws-sidebar-toggle   { display: none; }
    .aws-mobile-close-btn { display: flex; }

    #awdMobileMenuBtn { display: flex !important; }

    .aws-home-hero {
        flex-direction: column;
        align-items:    flex-start;
        padding:        20px;
        gap:            16px;
    }

    .aws-home-hero-actions {
        width:     100%;
        flex-wrap: wrap;
    }

    .aws-home-hero-actions .aws-btn {
        flex:            1;
        justify-content: center;
        min-width:       120px;
    }

    .aws-stats-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
    }

    .aws-stat-value  { font-size: 20px; }
    .aws-stat-card   { padding: 12px; gap: 10px; }

    .aws-shortcuts {
        flex-wrap:             nowrap;
        overflow-x:            auto;
        padding-bottom:        4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width:       none;
    }

    .aws-shortcuts::-webkit-scrollbar { display: none; }
    .aws-shortcut { flex-shrink: 0; }

    .aws-category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .aws-app-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 10px;
    }

    .aws-quick-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
    }

    .aws-app-row {
        grid-template-columns: 40px 1fr;
        gap:     10px;
        padding: 10px 12px;
    }

    .aws-app-row-cell,
    .aws-app-row-actions { display: none; }

    .aws-app-row-desc { display: none; }

    .aws-search-wrap    { max-width: 100%; }
    .aws-search-shortcut { display: none; }

    .aws-header-controls  { gap: 4px; }

    .aws-view-toggle { display: none; }

    .aws-header-btn:not(#awdMobileMenuBtn):not(.aws-theme-toggle) {
        display: none;
    }

    .aws-sort-wrap    { display: flex; }
    .aws-theme-toggle { display: flex; }

    #awsSortLabel { display: none; }

    #awsDetailsPanel {
        width:     100%;
        max-width: 340px;
    }

    .aws-cat-hero        { padding: 16px 20px; }
    .aws-cat-hero-title  { font-size: 17px; }
    .aws-cat-hero-stats  { display: none; }

    .aws-mcp-chips {
        flex-wrap:             nowrap;
        overflow-x:            auto;
        padding-bottom:        4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width:       none;
    }

    .aws-mcp-chips::-webkit-scrollbar { display: none; }
    .aws-mcp-chip { flex-shrink: 0; }

    .aws-cat-section-desc { display: none; }

    #awsCategoryTabs {
        flex-wrap:  nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    #awsCategoryTabs::-webkit-scrollbar { display: none; }
    #awsCategoryTabs > button { flex-shrink: 0; }

    #awsSidebar.mobile-open .aws-platform-folder .aws-nav-item-text,
    #awsSidebar.mobile-open .aws-platform-folder .arrow {
        opacity:        1;
        width:          auto;
        pointer-events: auto;
    }

    #awsSidebar.mobile-open .aws-platform-submenu.open {
        display: block !important;
    }

    #awsSidebar.mobile-open .aws-nav-item-text,
    #awsSidebar.mobile-open .aws-nav-tool-link .aws-nav-item-text {
        opacity:        1 !important;
        width:          auto !important;
        pointer-events: auto !important;
    }

    #awsSidebar.mobile-open .aws-nav-label {
        opacity: 1 !important;
    }

    #awsSidebar.mobile-open .aws-nav-badge,
    #awsSidebar.mobile-open .aws-nav-tool-badge {
        opacity: 1 !important;
    }

    #awsSidebar.mobile-open .aws-platform-folder {
        justify-content: flex-start !important;
        padding: 8px 10px 8px 18px !important;
    }

    #awsSidebar.mobile-open .aws-nav-item {
        justify-content: flex-start !important;
    }

    #awsSidebar.mobile-open .aws-nav-tool-link {
        justify-content: flex-start !important;
        padding: 8px 10px !important;
    }

    #awsSidebar.mobile-open .aws-storage-meter {
        display: block !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-logo {
        justify-content: flex-start !important;
        padding: 14px 16px 12px !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-logo-icon {
        display: none !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-logo-text {
        display: block !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-user-trigger {
        justify-content: flex-start !important;
        padding: 10px 12px !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-user-trigger > * {
        display: flex !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-user-trigger img {
        display: block !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   31. RESPONSIVE — PETIT MOBILE (≤ 480px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    #awsMain { padding: 12px; }

    .aws-home-hero {
        padding:       14px 16px;
        border-radius: var(--aws-radius-lg);
    }

    .aws-home-hero-text h2 { font-size: 17px; }
    .aws-home-hero-text p  { font-size: 12px; }

    .aws-stats-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 7px;
    }

    .aws-stat-card   { padding: 10px; gap: 8px; }
    .aws-stat-icon   { width: 34px; height: 34px; font-size: 14px; }
    .aws-stat-value  { font-size: 18px; }
    .aws-stat-label  { font-size: 9px; letter-spacing: 0; }

    .aws-app-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
    }

    .aws-app-card-header  { height: 70px; }
    .aws-app-card-icon    { font-size: 28px; }
    .aws-app-card-name    { font-size: 12px; }
    .aws-app-card-desc    { display: none; }
    .aws-app-card-features { display: none; }
    .aws-app-card-cta     { font-size: 10px; padding: 5px 9px; }

    .aws-quick-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 7px;
    }

    .aws-quick-card-thumb { width: 34px; height: 34px; font-size: 14px; }

    .aws-mcp-section  { padding: 12px 14px; }
    .aws-mcp-input    { font-size: 11px; }

    .aws-category-grid { grid-template-columns: 1fr; gap: 8px; }
    .aws-cat-card      { padding: 14px; gap: 10px; }
    .aws-cat-card-icon { width: 36px; height: 36px; font-size: 16px; }

    .aws-section-title { font-size: 10px; margin-top: 20px; }

    .aws-shortcut {
        padding:   6px 10px;
        font-size: 11px;
    }

    #awsHeader       { padding: 0 12px; gap: 8px; }
    .aws-user-avatar { width: 30px; height: 30px; }

    .aws-user-avatar-fallback {
        width:     30px;
        height:    30px;
        font-size: 12px;
    }

    .aws-search-input  { padding: 7px 30px; font-size: 11px; }
    .aws-search-icon   { left: 10px; }

    #awsDetailsPanel { max-width: 100%; }

    .aws-breadcrumb { display: none; }

    #awsUserMenu {
        right:     8px;
        min-width: 190px;
    }
}

/* ══════════════════════════════════════════════════════════════
   32. RESPONSIVE — TRÈS PETIT (≤ 360px)
══════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {

    #awsMain { padding: 10px; }

    .aws-app-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .aws-stats-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 6px;
    }

    .aws-home-hero-text h2 { font-size: 15px; }

    .aws-mcp-section { padding: 10px 12px; }

    .aws-quick-grid {
        grid-template-columns: repeat(2,1fr);
        gap: 6px;
    }
}

/* ══════════════════════════════════════════════════════════════
   33. PRINT
══════════════════════════════════════════════════════════════ */
@media print {

    #awsSidebar,
    #awsHeader,
    .aws-sidebar-toggle,
    .aws-mcp-section,
    .aws-shortcuts,
    .aws-mobile-backdrop,
    #awsDetailsPanel       { display: none !important; }

    #awsApp  { display: block; }
    #awsMain {
        grid-column: 1;
        padding: 0;
    }

    .aws-app-card {
        break-inside: avoid;
        box-shadow:   none;
        border:       1px solid var(--aws-border);
    }

    .aws-app-grid {
        grid-template-columns: repeat(3,1fr);
    }

    body { background: #fff !important; }
}

/* ═══════════════════════════════════════════════════════════════
   APP CARDS — MONOCHROME PREMIUM v2.0
   ═══════════════════════════════════════════════════════════════ */

.aws-app-card {
    background: var(--aws-card);
    border: 1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1),
                box-shadow 0.3s ease,
                border-color 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    will-change: transform;
    isolation: isolate;
}

.aws-app-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--aws-ink-soft);
    box-shadow: var(--aws-shadow-lg);
}

.aws-app-card-header {
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--aws-border);
}

.aws-app-card-icon {
    position: relative;
    z-index: 4;
    width: 56px;
    height: 56px;
    border-radius: var(--aws-radius-lg);
    background: var(--aws-card);
    border: 1px solid var(--aws-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--aws-text);
    box-shadow: var(--aws-shadow-card);
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}

.aws-app-card:hover .aws-app-card-icon {
    transform: scale(1.1) translateY(-2px) rotate(-6deg);
}

/* ── Quick Cards (home grid compact) ────────────────────────── */
.aws-quick-card-thumb {
    background: var(--aws-ink);
    color: var(--aws-bg);
    animation: none;
}

/* ── Badge NEW — fix taille définitif ───────────────────────── */
.aws-app-new-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: fit-content !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    font-size: 7px !important;
    font-weight: 900 !important;
    color: var(--aws-bg) !important;
    background: var(--aws-ink) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    z-index: 10 !important;
    white-space: nowrap !important;
    border: none !important;
    animation: none !important;
}

.aws-app-card-header::after { content: none !important; }

.aws-app-fav-btn,
.aws-app-open-btn { z-index: 3 !important; }

.aws-app-fav-btn { top: 10px; left: 10px; right: auto; }
.aws-app-open-btn { top: 10px; right: 10px; left: auto; }

.aws-app-new-badge {
    top: auto !important;
    bottom: 10px !important;
    left: 10px !important;
    right: auto !important;
}

/* ═══════════════════════════════════════════════════════════════
   GEMINI AI ASSISTANT SECTION — MONOCHROME
   ═══════════════════════════════════════════════════════════════ */

.aws-gemini-section {
    background: var(--aws-card);
    border: 1px solid var(--aws-border);
    border-radius: var(--aws-radius-xl);
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
    box-shadow: var(--aws-shadow-card);
}

.aws-gemini-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--aws-ink);
    opacity: 0.4;
}

.aws-gemini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--aws-border);
    background: var(--aws-border);
}

.aws-gemini-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aws-gemini-badge-logo {
    width: 24px;
    height: 24px;
    border-radius: var(--aws-radius);
    object-fit: contain;
}

.aws-gemini-badge-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--aws-text);
    letter-spacing: -0.2px;
}

.aws-gemini-badge-sub {
    font-size: 9px;
    font-weight: 700;
    color: var(--aws-text-dim);
    background: var(--aws-card);
    padding: 1px 7px;
    border-radius: var(--aws-radius-xl);
    border: 1px solid var(--aws-border);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.aws-gemini-open-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--aws-text);
    text-decoration: none;
    padding: 5px 11px;
    border-radius: var(--aws-radius);
    background: var(--aws-card);
    border: 1px solid var(--aws-border);
    transition: all 0.2s ease;
}

.aws-gemini-open-link:hover {
    border-color: var(--aws-ink-soft);
}

.aws-gemini-messages {
    max-height: 280px;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.aws-gemini-messages::-webkit-scrollbar { width: 3px; }
.aws-gemini-messages::-webkit-scrollbar-thumb {
    background: var(--aws-border);
    border-radius: 3px;
}

.aws-gemini-welcome {
    text-align: center;
    padding: 20px 16px;
}

.aws-gemini-welcome-icon {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 12px !important;
    background: var(--aws-card) !important;
    border: 1.5px solid var(--aws-border) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    box-shadow: var(--aws-shadow) !important;
}

.aws-gemini-welcome-icon img { width: 100% !important; height: 100% !important; object-fit: contain !important; }

.aws-gemini-welcome-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--aws-text);
    margin-bottom: 6px;
}

.aws-gemini-welcome-sub {
    font-size: 12px;
    color: var(--aws-text-dim);
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.aws-gemini-msg {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    animation: msgFadeIn 0.22s ease;
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aws-gemini-msg.user { flex-direction: row-reverse; }

.aws-gemini-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--aws-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    font-weight: 800;
    color: var(--aws-bg);
    overflow: hidden;
}

.aws-gemini-msg-avatar.ai {
    background: var(--aws-card);
    border: 1.5px solid var(--aws-border);
    box-shadow: var(--aws-shadow-card);
    padding: 5px;
}
.aws-gemini-msg-avatar.ai img { width: 100%; height: 100%; object-fit: contain; }

.aws-gemini-msg-avatar.user {
    background: var(--aws-ink);
    padding: 0;
}
.aws-gemini-msg-avatar.user img { width: 100%; height: 100%; object-fit: cover; display: block; }

.aws-gemini-msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: var(--aws-radius-lg);
    font-size: 12px;
    line-height: 1.55;
}

.aws-gemini-msg.ai .aws-gemini-msg-bubble {
    background: var(--aws-border);
    border: 1px solid var(--aws-border);
    color: var(--aws-text);
    border-top-left-radius: 4px;
}

.aws-gemini-msg.user .aws-gemini-msg-bubble {
    background: var(--aws-ink);
    color: var(--aws-bg);
    border-top-right-radius: 4px;
}

.aws-gemini-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--aws-border);
}

.aws-gemini-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: var(--aws-radius);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--aws-border);
    background: var(--aws-border);
    color: var(--aws-text);
    white-space: nowrap;
}

.aws-gemini-action-btn:hover { border-color: var(--aws-ink-soft); }

.aws-gemini-typing {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 2px 0;
}

.aws-gemini-typing-dots {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: var(--aws-border);
    border: 1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    border-top-left-radius: 4px;
}

.aws-gemini-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aws-text-muted);
    animation: typingDot 1.4s ease infinite;
}

.aws-gemini-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.aws-gemini-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0);   opacity: 0.35; }
    30%            { transform: translateY(-5px); opacity: 1;    }
}

.aws-gemini-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--aws-border);
}

.aws-gemini-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--aws-radius-xl);
    font-size: 10px;
    font-weight: 700;
    color: var(--aws-text-dim);
    background: var(--aws-border);
    border: 1px solid var(--aws-border);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.aws-gemini-chip:hover {
    color: var(--aws-text);
    border-color: var(--aws-ink-soft);
}

.aws-gemini-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--aws-border);
    background: var(--aws-border);
}

.aws-gemini-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 12px;
    color: var(--aws-text);
    outline: none;
    font-family: inherit;
    line-height: 1.4;
}

.aws-gemini-input::placeholder { color: var(--aws-text-muted); }

.aws-gemini-send {
    width: 34px;
    height: 34px;
    border-radius: var(--aws-radius);
    border: none;
    background: var(--aws-ink);
    color: var(--aws-bg);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aws-gemini-send:hover:not(:disabled) { opacity: 0.85; }
.aws-gemini-send:disabled { opacity: 0.5; cursor: not-allowed; }

.aws-gemini-clear {
    background: none;
    border: none;
    color: var(--aws-text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--aws-radius);
    transition: all 0.15s;
    flex-shrink: 0;
}

.aws-gemini-clear:hover { color: var(--aws-text); background: var(--aws-card-hover); }

/* ── Avatar fix (spécificité forcée) ─────────────────────── */
.aws-gemini-msg-avatar.ai,
.aws-gemini-typing-avatar,
.aws-gemini-welcome-icon {
    background: var(--aws-card) !important;
    border-color: var(--aws-border) !important;
    box-shadow: var(--aws-shadow-card) !important;
}

.aws-gemini-typing-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 5px;
}
.aws-gemini-typing-avatar img { width: 100%; height: 100%; object-fit: contain; }

.avd-gemini-send-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--aws-bg);
    border-radius: 50%;
    animation: avdGeminiSpin 0.7s linear infinite;
}

@keyframes avdGeminiSpin { to { transform: rotate(360deg); } }

/* ══════════ VOICE INPUT — Workspace AI Assistant ══════════ */
.aws-gemini-mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border);
    background: var(--aws-input-bg);
    color: var(--aws-text-faint, var(--aws-text-muted));
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s;
    font-size: 13px;
}
.aws-gemini-mic-btn:hover {
    border-color: var(--aws-ink-soft);
    color: var(--aws-text);
}
.aws-gemini-mic-btn.listening {
    background: var(--aws-red-bg);
    border-color: var(--aws-red);
    color: var(--aws-red);
    animation: awsMicPulse 1.2s ease-in-out infinite;
}
.aws-gemini-mic-btn.processing {
    background: var(--aws-border);
    border-color: var(--aws-ink-soft);
    color: var(--aws-text);
}
@keyframes awsMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.aws-gemini-mic-transcript {
    font-size: 11px;
    color: var(--aws-text-faint, var(--aws-text-muted));
    padding: 4px 10px 0;
    display: none;
    align-items: center;
    gap: 6px;
}
.aws-gemini-mic-transcript.active { display: flex; }
.aws-gemini-mic-transcript i { color: var(--aws-red); font-size: 9px; }

.aws-gemini-mic-btn.speaking {
    background: var(--aws-border);
    border-color: var(--aws-ink);
    color: var(--aws-text);
    animation: awsMicSpeaking 1s ease-in-out infinite;
}
@keyframes awsMicSpeaking {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}
.aws-gemini-tts-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border);
    background: var(--aws-input-bg);
    color: var(--aws-text-faint, var(--aws-text-muted));
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s;
    font-size: 11px;
    margin-right: 4px;
}
.aws-gemini-tts-toggle:hover { border-color: var(--aws-ink-soft); color: var(--aws-text); }
.aws-gemini-tts-toggle.active {
    background: var(--aws-border);
    border-color: var(--aws-ink);
    color: var(--aws-text);
}

/* ═══════════════════════════════════════════════════════
   TRI-LOGO — Icône combinée Claude / OpenAI / Gemini
   ═══════════════════════════════════════════════════════ */
.aws-tri-logo {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.aws-tri-logo-img {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--aws-card);
    border: 1.5px solid var(--aws-ink);
    box-shadow: var(--aws-shadow-card);
}

.aws-tri-logo-c { top: 0;    left: 4px; z-index: 3; }
.aws-tri-logo-o { bottom: 0; left: 0;   z-index: 2; }
.aws-tri-logo-g { bottom: 0; right: 0;  z-index: 1; }

.aws-tri-logo-card { width: 26px; height: 26px; }
.aws-tri-logo-card .aws-tri-logo-img { width: 15px; height: 15px; border-color: var(--aws-bg); }
.aws-tri-logo-card .aws-tri-logo-c { left: 5.5px; }

.aws-tri-logo-white .aws-tri-logo-img { border-color: var(--aws-bg); }

/* ══════════════════════════════════════════════════════════
   THINKING BLOCK — Style minimaliste (monochrome)
   ══════════════════════════════════════════════════════════ */
.aa-think {
    margin-bottom: 12px;
    border: 1px solid var(--aws-border);
    border-radius: var(--aws-radius-lg);
    background: var(--aws-card);
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.aa-think.is-active {
    border-color: var(--aws-ink-soft);
    box-shadow: var(--aws-shadow-card);
}
.aa-think-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.aa-think-header:hover { background: var(--aws-border); }
.aa-think-icon {
    position: relative;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.aa-think-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.6px solid var(--aws-border);
    border-top-color: var(--aws-text);
    animation: aaRingSpin 0.85s linear infinite;
    opacity: 1;
    transition: opacity .3s ease;
}
.aa-think:not(.is-active) .aa-think-ring { opacity: 0; }
@keyframes aaRingSpin { to { transform: rotate(360deg); } }
@property --think-radius { syntax: ''; inherits: false; initial-value: 0%; }
@property --think-angle { syntax: ''; inherits: false; initial-value: 0deg; }
.aa-think-logo {
    width: 13px; height: 13px;
    object-fit: contain;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    opacity: 0.85;
    transition: opacity .3s ease;
    --think-radius: 0%;
    --think-angle: 0deg;
    -webkit-mask-image:
        radial-gradient(circle, #000 62%, transparent 64%),
        conic-gradient(from -90deg, #000 var(--think-angle), transparent var(--think-angle));
    mask-image:
        radial-gradient(circle, #000 62%, transparent 64%),
        conic-gradient(from -90deg, #000 var(--think-angle), transparent var(--think-angle));
    -webkit-mask-size: var(--think-radius) var(--think-radius), 100% 100%;
    mask-size: var(--think-radius) var(--think-radius), 100% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;
    -webkit-mask-position: center, center;
    mask-position: center, center;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
.aa-think.is-active .aa-think-logo { animation: aaLogoReveal 1.6s cubic-bezier(.45,0,.55,1) infinite; }
.aa-think:not(.is-active) .aa-think-logo { --think-radius: 160%; --think-angle: 360deg; opacity: 1; }
@keyframes aaLogoReveal {
    0%   { --think-radius: 0%;   --think-angle: 0deg;   opacity: 0;    }
    12%  { opacity: 1; }
    55%  { --think-radius: 160%; --think-angle: 360deg; opacity: 1;    }
    78%  { --think-radius: 160%; --think-angle: 360deg; opacity: 1;    }
    100% { --think-radius: 160%; --think-angle: 360deg; opacity: 0.15; }
}
.aa-think-label {
    flex: 1;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aws-text);
    letter-spacing: 0.1px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.aa-think-dots { display: inline-flex; gap: 2px; margin-left: 2px; }
.aa-think-dots i {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--aws-text-muted);
    animation: aaThinkDot 1.1s ease-in-out infinite;
    display: inline-block;
}
.aa-think-dots i:nth-child(2) { animation-delay: .15s; }
.aa-think-dots i:nth-child(3) { animation-delay: .3s; }
.aa-think:not(.is-active) .aa-think-dots { display: none; }
@keyframes aaThinkDot {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40%           { opacity: 1;   transform: translateY(-1.5px); }
}
.aa-think-chev {
    font-size: 10px;
    color: var(--aws-text-muted);
    transition: transform .25s ease;
    flex-shrink: 0;
}
.aa-think.is-open .aa-think-chev { transform: rotate(180deg); }
.aa-think-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.aa-think.is-open .aa-think-body { max-height: 260px; overflow-y: auto; }
.aa-think-text {
    padding: 2px 14px 14px 42px;
    font-size: 12px;
    line-height: 1.65;
    color: var(--aws-text-dim);
    font-style: italic;
    white-space: pre-wrap;
    border-top: 1px solid var(--aws-border);
    margin-top: 2px;
    padding-top: 10px;
}
.aa-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--aws-ink);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: aaCursorBlink 0.8s step-end infinite;
}
@keyframes aaCursorBlink {
    0%, 50%  { opacity: 1; }
    51%, 100% { opacity: 0; }
}
.aws-gemini-msg-bubble .aa-think-slot:empty { display: none; }

/* ══════════════════════════════════════════════════════════════
   34. ENTERPRISE WORKSPACE CONFIG (ews-*) — Monochrome
══════════════════════════════════════════════════════════════ */

.ews-customize-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 4000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--aws-ink);
    color: var(--aws-bg);
    border: none;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--aws-shadow-lg);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    letter-spacing: 0.3px;
}
.ews-customize-btn:hover { opacity: 0.88; transform: translateY(-2px) scale(1.03); }
.ews-customize-btn:active { transform: scale(0.97); }
.ews-customize-btn-icon { font-size: 13px; }

.ews-config-panel {
    position: fixed; inset: 0; z-index: 9000;
    pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.ews-config-panel.open { pointer-events: all; opacity: 1; }
.ews-config-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
.ews-config-drawer {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 500px; max-width: 96vw;
    background: var(--aws-card);
    border-left: 1px solid var(--aws-border);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--aws-shadow-lg);
}
.ews-config-panel.open .ews-config-drawer { transform: translateX(0); }

.ews-config-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--aws-border);
    flex-shrink: 0; background: var(--aws-border-soft, var(--aws-border));
}
.ews-config-header-title { font-size: 15px; font-weight: 900; color: var(--aws-text); display: flex; align-items: center; }
.ews-config-header-sub { font-size: 11px; color: var(--aws-text-dim); margin-top: 3px; }
.ews-config-close {
    width: 32px; height: 32px; border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border); background: transparent;
    color: var(--aws-text-dim); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: all .2s; flex-shrink: 0;
}
.ews-config-close:hover { background: var(--aws-border); color: var(--aws-text); }

.ews-config-tabs {
    display: flex; gap: 2px; padding: 8px 12px;
    border-bottom: 1px solid var(--aws-border);
    background: var(--aws-sidebar-bg); flex-shrink: 0;
    overflow-x: auto; scrollbar-width: none;
}
.ews-config-tabs::-webkit-scrollbar { display: none; }
.ews-config-tab {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 12px; border-radius: var(--aws-radius);
    border: none; background: transparent;
    color: var(--aws-text-dim); font-size: 11px; font-weight: 700;
    font-family: inherit; cursor: pointer; white-space: nowrap;
    transition: all .2s; letter-spacing: 0.3px;
}
.ews-config-tab:hover { background: var(--aws-border); color: var(--aws-text); }
.ews-config-tab.active { background: var(--aws-ink); color: var(--aws-bg); }
.ews-config-tab i { font-size: 11px; }

.ews-config-body { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--aws-border) transparent; }
.ews-tab-content { padding: 20px 24px; display: flex; flex-direction: column; gap: 0; }

.ews-config-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 16px 24px; border-top: 1px solid var(--aws-border);
    background: var(--aws-card); flex-shrink: 0;
}

.ews-field-group { margin-bottom: 20px; }
.ews-label { display: block; font-size: 12px; font-weight: 800; color: var(--aws-text); margin-bottom: 6px; letter-spacing: 0.2px; }
.ews-optional { font-weight: 500; color: var(--aws-text-muted); font-size: 10px; margin-left: 4px; }
.ews-hint { font-size: 10px; color: var(--aws-text-muted); margin-top: 5px; line-height: 1.5; }
.ews-hint-inline { font-size: 10px; color: var(--aws-text-muted); font-weight: 400; }
.ews-input {
    width: 100%; padding: 9px 12px; border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border); background: var(--aws-input-bg);
    color: var(--aws-text); font-size: 12px; font-family: inherit;
    outline: none; transition: border-color .2s, box-shadow .2s; box-sizing: border-box;
}
.ews-input:focus { border-color: var(--aws-ink); background: var(--aws-card); }
.ews-select { appearance: none; cursor: pointer; }
.ews-textarea { resize: vertical; min-height: 70px; }
.ews-divider { border: none; border-top: 1px solid var(--aws-border); margin: 20px 0; }
.ews-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border); background: transparent;
    color: var(--aws-text-dim); font-size: 11px; font-weight: 700;
    font-family: inherit; cursor: pointer; transition: all .2s;
}
.ews-back-btn:hover { background: var(--aws-border); color: var(--aws-text); }

.ews-color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ews-color-picker { width: 44px; height: 36px; border-radius: var(--aws-radius); border: 1px solid var(--aws-border); padding: 2px; cursor: pointer; background: transparent; flex-shrink: 0; }
.ews-color-hex {
    width: 90px; padding: 7px 10px; border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border); background: var(--aws-input-bg);
    color: var(--aws-text); font-size: 11px; font-family: monospace; outline: none;
}
.ews-color-hex:focus { border-color: var(--aws-ink); }
.ews-color-swatch { width: 28px; height: 28px; border-radius: var(--aws-radius); border: 1px solid var(--aws-border); flex-shrink: 0; }
.ews-color-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ews-color-preset {
    width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
    border: 2px solid transparent; transition: transform .2s, border-color .2s;
    box-shadow: var(--aws-shadow-card);
}
.ews-color-preset:hover { transform: scale(1.2); border-color: var(--aws-ink-soft); }

.ews-toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.ews-toggle-switch input { opacity: 0; width: 0; height: 0; }
.ews-toggle-slider { position: absolute; inset: 0; background: var(--aws-border); border-radius: 22px; cursor: pointer; transition: .25s; }
.ews-toggle-slider:before {
    content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
    background: var(--aws-card); border-radius: 50%; transition: .25s; box-shadow: var(--aws-shadow-card);
}
.ews-toggle-switch input:checked + .ews-toggle-slider { background: var(--aws-ink); }
.ews-toggle-switch input:checked + .ews-toggle-slider:before { transform: translateX(18px); background: var(--aws-bg); }
.ews-toggle-row-field {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 16px; background: var(--aws-input-bg); border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border);
}
.ews-toggle-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.ews-toggle-label { font-size: 13px; font-weight: 700; color: var(--aws-text); display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ews-toggle-desc { font-size: 11px; color: var(--aws-text-dim); }
.ews-toggle-info { flex: 1; }

.ews-apps-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ews-apps-stats { display: flex; gap: 12px; }
.ews-apps-stat { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--aws-text-dim); font-weight: 600; }
.ews-apps-stat strong { color: var(--aws-text); font-weight: 800; }
.ews-search-small {
    padding: 7px 12px; border-radius: 20px; border: 1px solid var(--aws-border);
    background: var(--aws-input-bg); color: var(--aws-text); font-size: 11px;
    font-family: inherit; outline: none; width: 160px; transition: all .2s;
}
.ews-search-small:focus { border-color: var(--aws-ink); width: 200px; }
.ews-cat-group { margin-bottom: 4px; }
.ews-cat-group-header {
    display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800;
    color: var(--aws-text-muted); text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 0 5px;
}
.ews-app-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    border-radius: var(--aws-radius); margin-bottom: 3px;
    border: 1px solid transparent; transition: all .2s; background: var(--aws-input-bg);
}
.ews-app-item:hover { border-color: var(--aws-border); }
.ews-app-item--hidden { opacity: 0.55; background: var(--aws-red-bg); border-color: rgba(239,68,68,0.2) !important; }
.ews-app-item-icon {
    width: 30px; height: 30px; border-radius: var(--aws-radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--aws-bg); background: var(--aws-ink); font-size: 12px; flex-shrink: 0;
}
.ews-app-item-info { flex: 1; min-width: 0; }
.ews-app-item-name { font-size: 12px; font-weight: 700; color: var(--aws-text); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ews-app-item-desc { font-size: 10px; color: var(--aws-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ews-app-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ews-app-action-btn {
    width: 28px; height: 28px; border-radius: var(--aws-radius);
    border: 1px solid var(--aws-border); background: transparent;
    color: var(--aws-text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 11px; transition: all .2s;
}
.ews-app-action-btn:hover { background: var(--aws-border); }
.ews-app-action-btn.active { background: var(--aws-border); border-color: var(--aws-ink-soft); color: var(--aws-text); }
.ews-app-action-btn--danger:hover { background: var(--aws-red-bg); border-color: var(--aws-red); color: var(--aws-red); }
.ews-app-action-btn--danger.active { background: var(--aws-red-bg); border-color: var(--aws-red); color: var(--aws-red); }

.ews-tag { font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 10px; letter-spacing: 0.3px; text-transform: uppercase; }
.ews-tag--red { background: var(--aws-red-bg); color: var(--aws-red); border: 1px solid rgba(239,68,68,0.25); }
.ews-tag--blue { background: var(--aws-border); color: var(--aws-text); border: 1px solid var(--aws-border); }
.ews-count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; background: var(--aws-ink); color: var(--aws-bg);
    border-radius: 10px; font-size: 9px; font-weight: 800; padding: 0 5px; margin-left: 6px;
}

.ews-shortcuts-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ews-shortcut-item {
    display: flex; align-items: center; justify-content: space-between; padding: 9px 12px;
    border-radius: var(--aws-radius); border: 1px solid var(--aws-border); background: var(--aws-input-bg);
}
.ews-shortcut-item-info { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--aws-text); }

.ews-custom-link-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: var(--aws-radius); border: 1px solid var(--aws-border);
    background: var(--aws-input-bg); margin-bottom: 6px; transition: all .2s;
}
.ews-custom-link-item:hover { border-color: var(--aws-ink-soft); }
.ews-custom-link-icon { width: 32px; height: 32px; border-radius: var(--aws-radius); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: var(--aws-border); color: var(--aws-text); }
.ews-custom-link-info { flex: 1; min-width: 0; }
.ews-custom-link-label { font-size: 12px; font-weight: 700; color: var(--aws-text); }
.ews-custom-link-url { font-size: 10px; color: var(--aws-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ews-custom-link-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ews-icon-btn {
    width: 28px; height: 28px; border-radius: var(--aws-radius); border: 1px solid var(--aws-border);
    background: transparent; color: var(--aws-text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 11px; transition: all .2s;
}
.ews-icon-btn:hover { background: var(--aws-border); color: var(--aws-text); }
.ews-icon-btn--danger:hover { background: var(--aws-red-bg); color: var(--aws-red); border-color: var(--aws-red); }
.ews-empty-state-sm {
    display: flex; align-items: center; gap: 8px; padding: 16px;
    border-radius: var(--aws-radius); border: 2px dashed var(--aws-border);
    color: var(--aws-text-muted); font-size: 11px; font-style: italic;
}
.ews-icon-preview {
    display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px;
    border-radius: var(--aws-radius); background: var(--aws-input-bg); border: 1px solid var(--aws-border);
    font-size: 13px; color: var(--aws-text);
}

.ews-type-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ews-type-pill {
    display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 20px;
    border: 1px solid var(--aws-border); background: transparent; color: var(--aws-text-dim);
    font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .2s;
}
.ews-type-pill:hover { border-color: var(--aws-ink-soft); color: var(--aws-text); }
.ews-type-pill.active { border-color: var(--aws-ink); background: var(--aws-border); color: var(--aws-text); font-weight: 800; }

.ews-preview-placeholder {
    display: flex; align-items: center; gap: 8px; padding: 16px;
    border-radius: var(--aws-radius); border: 2px dashed var(--aws-border);
    color: var(--aws-text-muted); font-size: 12px; font-style: italic;
}
.ews-ann-preview { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--aws-radius); border: 1px solid; font-size: 12px; line-height: 1.5; }

.ews-announcement {
    display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-radius: var(--aws-radius);
    margin-bottom: 18px; border: 1px solid; font-size: 12px; line-height: 1.5;
    animation: ewsBannerSlide .4s cubic-bezier(.4,0,.2,1);
}
@keyframes ewsBannerSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.ews-announcement-icon { font-size: 14px; flex-shrink: 0; }
.ews-announcement-content { flex: 1; }
.ews-announcement-title { font-weight: 800; }
.ews-announcement-dismiss { background: none; border: none; color: inherit; opacity: 0.5; cursor: pointer; font-size: 11px; padding: 2px 4px; border-radius: 4px; transition: opacity .2s; flex-shrink: 0; }
.ews-announcement-dismiss:hover { opacity: 1; }

.ews-announcement--info, .ews-ann-preview.ews-announcement--info { background: var(--aws-border); border-color: var(--aws-border); color: var(--aws-text); }
.ews-announcement--success, .ews-ann-preview.ews-announcement--success { background: var(--aws-border); border-color: var(--aws-border); color: var(--aws-text); }
.ews-announcement--warning, .ews-ann-preview.ews-announcement--warning { background: var(--aws-border); border-color: var(--aws-border); color: var(--aws-text); }
.ews-announcement--danger,  .ews-ann-preview.ews-announcement--danger  { background: var(--aws-red-bg);  border-color: rgba(239,68,68,0.25);  color: var(--aws-red); }

.ews-pinned-section { margin-bottom: 28px; }
.ews-pinned-admin-badge {
    font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
    background: var(--aws-border); color: var(--aws-text); border: 1px solid var(--aws-border);
    margin-left: 6px; cursor: pointer;
}
.ews-pinned-admin-badge:hover { border-color: var(--aws-ink-soft); }

.ews-company-badge {
    font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
    background: var(--aws-border); color: var(--aws-text); border: 1px solid var(--aws-border);
    margin: 4px 8px 8px 8px; text-align: center; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: 0.3px; text-transform: uppercase;
}

.ews-preview-card { border-radius: var(--aws-radius-lg); border: 1px solid var(--aws-border); overflow: hidden; margin-top: 8px; }
.ews-preview-label {
    font-size: 10px; font-weight: 700; color: var(--aws-text-muted); padding: 8px 12px;
    background: var(--aws-input-bg); border-bottom: 1px solid var(--aws-border);
    text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 5px;
}
.ews-brand-preview { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ews-brand-preview-sidebar { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--aws-radius); background: var(--aws-sidebar-bg); border: 1px solid var(--aws-border); }
.ews-brand-preview-logo { width: 28px; height: 28px; border-radius: var(--aws-radius); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.ews-brand-preview-accent { height: 4px; border-radius: 4px; transition: background .3s; }

.ews-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
    border-radius: var(--aws-radius); border: none; font-size: 12px; font-weight: 700;
    font-family: inherit; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.ews-btn-sm { padding: 6px 11px; font-size: 11px; }
.ews-btn-primary { background: var(--aws-ink); color: var(--aws-bg); }
.ews-btn-primary:hover { opacity: 0.88; }
.ews-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ews-btn-ghost { background: transparent; color: var(--aws-text-dim); border: 1px solid var(--aws-border); }
.ews-btn-ghost:hover { background: var(--aws-border); color: var(--aws-text); }
.ews-btn-danger { background: var(--aws-red-bg); color: var(--aws-red); border: 1px solid rgba(239,68,68,0.25); }
.ews-btn-danger:hover { opacity: 0.85; }

.ews-logo-preview {
    margin-top: 10px; width: 64px; height: 64px; border-radius: var(--aws-radius-lg);
    border: 1px solid var(--aws-border); background: var(--aws-input-bg);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ews-logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.ews-logo-placeholder { color: var(--aws-text-muted); font-size: 22px; }
.ews-logo-error { font-size: 10px; color: var(--aws-red); text-align: center; padding: 4px; }

@media (max-width: 600px) {
    .ews-customize-btn { bottom: 16px; right: 16px; }
    .ews-customize-btn-label { display: none; }
    .ews-customize-btn { border-radius: 50%; width: 46px; height: 46px; padding: 0; justify-content: center; }
    .ews-config-drawer { width: 100vw; }
}

.ews-gradient-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.ews-gradient-swatch { height: 38px; border-radius: var(--aws-radius); cursor: pointer; border: 2.5px solid transparent; transition: transform .2s, border-color .2s, box-shadow .2s; position: relative; }
.ews-gradient-swatch:hover { transform: scale(1.06); }
.ews-gradient-swatch.selected { border-color: var(--aws-ink); box-shadow: var(--aws-shadow); }
.ews-gradient-swatch-label { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; color: var(--aws-text-muted); white-space: nowrap; }

.ews-logo-upload-area {
    border: 2px dashed var(--aws-border); border-radius: var(--aws-radius-lg); padding: 20px;
    text-align: center; cursor: pointer; transition: all .2s; background: var(--aws-input-bg); margin-top: 8px;
}
.ews-logo-upload-area:hover { border-color: var(--aws-ink-soft); background: var(--aws-border); }
.ews-logo-upload-area.dragging { border-color: var(--aws-ink); background: var(--aws-border); transform: scale(1.01); }
.ews-logo-upload-icon { font-size: 28px; color: var(--aws-text-muted); margin-bottom: 8px; }
.ews-logo-upload-text { font-size: 12px; font-weight: 600; color: var(--aws-text); margin-bottom: 4px; }
.ews-logo-upload-sub { font-size: 10px; color: var(--aws-text-muted); }
.ews-logo-current { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--aws-input-bg); border-radius: var(--aws-radius); border: 1px solid var(--aws-border); margin-top: 10px; }
.ews-logo-current img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; border: 1px solid var(--aws-border); background: var(--aws-card); padding: 3px; }
.ews-logo-current-info { flex: 1; min-width: 0; }
.ews-logo-current-name { font-size: 11px; font-weight: 700; color: var(--aws-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ews-logo-current-size { font-size: 10px; color: var(--aws-text-muted); margin-top: 2px; }
.ews-logo-upload-progress { margin-top: 10px; display: none; }
.ews-logo-progress-bar { height: 4px; background: var(--aws-border); border-radius: 4px; overflow: hidden; }
.ews-logo-progress-fill { height: 100%; background: var(--aws-ink); border-radius: 4px; transition: width .3s; }
.ews-logo-progress-text { font-size: 10px; color: var(--aws-text-muted); margin-top: 4px; text-align: center; }

.ews-color-mode-tabs { display: flex; gap: 4px; background: var(--aws-input-bg); border-radius: var(--aws-radius); padding: 3px; border: 1px solid var(--aws-border); margin-bottom: 12px; }
.ews-color-mode-tab { flex: 1; padding: 7px 12px; border-radius: 7px; border: none; background: transparent; color: var(--aws-text-muted); font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .2s; }
.ews-color-mode-tab.active { background: var(--aws-ink); color: var(--aws-bg); }

/* ============================================================
   EWC — PERSONNALISATION AVANCÉE v2.0
   ============================================================ */
#ewsWorkspaceBg { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity .5s ease, background .5s ease; background-size: cover; background-position: center; background-repeat: no-repeat; }
#ewsWorkspaceBg .ewsBgOverlay { position: absolute; inset: 0; transition: background .5s ease, opacity .5s ease; }
#ewsWorkspaceBg .ewsBgPattern { position: absolute; inset: 0; transition: opacity .4s ease; }
#awsApp { position: relative; z-index: 1000; }

.ews-bg-type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ews-bg-type-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px;
    border-radius: var(--aws-radius); border: 1px solid var(--aws-border); background: var(--aws-input-bg);
    color: var(--aws-text-dim); font-size: 10px; font-weight: 700; cursor: pointer; transition: all .15s ease;
    text-transform: uppercase; letter-spacing: .3px;
}
.ews-bg-type-btn i { font-size: 15px; }
.ews-bg-type-btn:hover { border-color: var(--aws-ink-soft); color: var(--aws-text); }
.ews-bg-type-btn.active { border-color: var(--aws-ink); background: var(--aws-border); color: var(--aws-text); }

.ews-pattern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.ews-pattern-swatch { height: 68px; border-radius: var(--aws-radius); border: 2px solid var(--aws-border); cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; transition: all .15s ease; position: relative; overflow: hidden; }
.ews-pattern-swatch span { font-size: 10px; font-weight: 800; background: rgba(0,0,0,.45); color: #fff; padding: 2px 7px; border-radius: 6px; position: relative; z-index: 1; }
.ews-pattern-swatch:hover { border-color: var(--aws-ink-soft); transform: translateY(-2px); }
.ews-pattern-swatch.selected { border-color: var(--aws-ink); box-shadow: var(--aws-shadow); }

.ews-bg-preview-box { height: 90px; border-radius: var(--aws-radius-lg); border: 1px solid var(--aws-border); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.ews-bg-preview-box .ews-bg-preview-label { font-size: 11px; font-weight: 700; color: var(--aws-text-muted); position: relative; z-index: 1; }
.ews-bg-preview-inner { position: absolute; inset: 0; }

.ews-sidebar-style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.ews-sidebar-swatch { height: 72px; border-radius: var(--aws-radius); border: 2px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; transition: all .15s ease; }
.ews-sidebar-swatch span { font-size: 9px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 4px; }
.ews-sidebar-swatch.is-light span { color: #1e293b; text-shadow: none; background: rgba(0,0,0,.08); }
.ews-sidebar-swatch:hover { transform: translateY(-2px); border-color: var(--aws-ink-soft); }
.ews-sidebar-swatch.selected { border-color: var(--aws-ink); box-shadow: var(--aws-shadow); }

.ews-font-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.ews-font-card { padding: 12px 14px; border-radius: var(--aws-radius); border: 2px solid var(--aws-border); background: var(--aws-input-bg); cursor: pointer; transition: all .15s ease; }
.ews-font-card:hover { border-color: var(--aws-ink-soft); }
.ews-font-card.selected { border-color: var(--aws-ink); background: var(--aws-border); }
.ews-font-card-sample { font-size: 18px; font-weight: 700; color: var(--aws-text); line-height: 1.2; margin-bottom: 4px; }
.ews-font-card-name { font-size: 10px; font-weight: 700; color: var(--aws-text-dim); text-transform: uppercase; letter-spacing: .5px; }

.ews-radius-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.ews-radius-card { padding: 10px 6px; border: 2px solid var(--aws-border); background: var(--aws-input-bg); cursor: pointer; transition: all .15s ease; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ews-radius-card:hover { border-color: var(--aws-ink-soft); }
.ews-radius-card.selected { border-color: var(--aws-ink); background: var(--aws-border); }
.ews-radius-preview { width: 36px; height: 22px; background: var(--aws-ink); opacity: .5; }
.ews-radius-label { font-size: 9px; font-weight: 800; color: var(--aws-text-dim); text-transform: uppercase; letter-spacing: .4px; }

.ews-home-section-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ews-home-section-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--aws-radius); background: var(--aws-input-bg); border: 1px solid var(--aws-border); transition: border-color .15s ease; }
.ews-home-section-item:hover { border-color: var(--aws-ink-soft); }
.ews-home-section-item-info { display: flex; align-items: center; gap: 10px; }
.ews-home-section-item-icon { width: 28px; height: 28px; border-radius: var(--aws-radius); display: flex; align-items: center; justify-content: center; font-size: 12px; background: var(--aws-border); color: var(--aws-text); }
.ews-home-section-label { font-size: 12px; font-weight: 700; color: var(--aws-text); }
.ews-home-section-desc { font-size: 10px; color: var(--aws-text-dim); margin-top: 1px; }

.ews-hero-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.ews-hero-style-card { padding: 10px; border-radius: var(--aws-radius); border: 2px solid var(--aws-border); background: var(--aws-input-bg); cursor: pointer; text-align: center; transition: all .15s ease; }
.ews-hero-style-card:hover { border-color: var(--aws-ink-soft); }
.ews-hero-style-card.selected { border-color: var(--aws-ink); background: var(--aws-border); }
.ews-hero-style-preview { height: 36px; border-radius: 6px; margin-bottom: 7px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ews-hero-style-name { font-size: 10px; font-weight: 800; color: var(--aws-text-dim); text-transform: uppercase; letter-spacing: .4px; }

#ewsHeroBanner { border-radius: var(--aws-radius-lg); overflow: hidden; margin-bottom: 20px; position: relative; min-height: 120px; display: flex; align-items: center; padding: 32px 36px; background-size: cover; background-position: center; }
#ewsHeroBanner .ewsHeroBannerOverlay { position: absolute; inset: 0; }
#ewsHeroBanner .ewsHeroBannerContent { position: relative; z-index: 1; }
#ewsHeroBanner .ewsHeroBannerTitle { font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.3); margin-bottom: 6px; }
#ewsHeroBanner .ewsHeroBannerSub { font-size: 14px; color: rgba(255,255,255,.85); font-weight: 500; }

.ews-widget-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ews-widget-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--aws-radius-lg); background: var(--aws-input-bg); border: 1px solid var(--aws-border); }
.ews-widget-item-icon { width: 36px; height: 36px; border-radius: var(--aws-radius); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--aws-border); color: var(--aws-text); }
.ews-widget-item-info { flex: 1; min-width: 0; }
.ews-widget-item-title { font-size: 12px; font-weight: 700; color: var(--aws-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ews-widget-item-url { font-size: 10px; color: var(--aws-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.ews-widget-iframe-section { margin-top: 20px; }
.ews-widget-iframe-card { border-radius: var(--aws-radius-lg); overflow: hidden; border: 1px solid var(--aws-border); background: var(--aws-card); margin-bottom: 16px; }
.ews-widget-iframe-header { padding: 10px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--aws-border); font-size: 12px; font-weight: 700; color: var(--aws-text); }
.ews-widget-iframe-card iframe { width: 100%; border: none; display: block; }

.ews-css-editor {
    font-family: 'Courier New', Courier, monospace; font-size: 11px; line-height: 1.7;
    min-height: 130px; resize: vertical; background: var(--aws-bg); color: var(--aws-text);
    border: 1px solid var(--aws-border); border-radius: var(--aws-radius); padding: 12px;
    width: 100%; box-sizing: border-box; outline: none; transition: border-color .15s ease;
}
.ews-css-editor:focus { border-color: var(--aws-ink); }

.ews-range-row { display: flex; align-items: center; gap: 12px; }
.ews-range-row input[type=range] { flex: 1; accent-color: var(--aws-ink); height: 4px; cursor: pointer; }
.ews-range-val { font-size: 12px; font-weight: 800; min-width: 36px; text-align: right; color: var(--aws-text); }

.aws-home-hero.hero-minimal { padding: 12px 0; min-height: unset; }
.aws-home-hero.hero-minimal h2 { font-size: 18px; }
.aws-home-hero.hero-minimal p { display: none; }

.ews-widget-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 12px; }
.ews-widget-card {
    border-radius: var(--aws-radius-xl); padding: 28px 16px 20px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; text-align: center; position: relative; overflow: hidden; min-height: 140px;
    box-shadow: var(--aws-shadow); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
    user-select: none;
}
.ews-widget-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 60%); pointer-events: none; }
.ews-widget-card:hover { transform: translateY(-5px) scale(1.03); box-shadow: var(--aws-shadow-lg); }
.ews-widget-card:active { transform: translateY(-2px) scale(1.01); }
.ews-widget-card-open {
    position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 6px;
    background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
    font-size: 9px; color: rgba(255,255,255,.7); transition: background .15s ease, color .15s ease, transform .15s ease;
}
.ews-widget-card:hover .ews-widget-card-open { background: rgba(255,255,255,.35); color: white; transform: translate(2px, -2px); }
.ews-widget-card-icon {
    width: 56px; height: 56px; border-radius: var(--aws-radius-lg); background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.28); display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white; box-shadow: 0 4px 12px rgba(0,0,0,.15); transition: transform .22s ease, box-shadow .22s ease; flex-shrink: 0;
}
.ews-widget-card:hover .ews-widget-card-icon { transform: scale(1.1) rotate(-5deg); }
.ews-widget-card-title { font-size: 12px; font-weight: 800; color: white; text-shadow: 0 1px 6px rgba(0,0,0,.35); line-height: 1.3; letter-spacing: .2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ════════════════════════════════════════════════════════════
   DEV APPS TAB — Layout fixes (monochrome)
════════════════════════════════════════════════════════════ */
.ews-code-project-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--aws-border);
    border-radius: var(--aws-radius);
    background: var(--aws-card);
    margin-bottom: 6px;
    transition: border-color .2s, transform .15s, background .2s;
}
.ews-code-project-item:hover {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    background: var(--aws-card-hover, var(--aws-border-soft));
    transform: translateX(2px);
}
.ews-code-project-item.is-published {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    background: var(--aws-border-soft);
}
.ews-code-project-icon {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    background: var(--aws-border-soft);
    color: var(--aws-text);
}
.ews-code-project-info { flex: 1; min-width: 0; }
.ews-code-project-name {
    font-size: 12px; font-weight: 700; color: var(--aws-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px;
}
.ews-code-project-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ews-code-project-date { font-size: 10px; color: var(--aws-text-dim); }

.ews-published-app-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid var(--aws-border);
    border-radius: var(--aws-radius);
    background: var(--aws-card); margin-bottom: 6px;
    transition: border-color .2s, background .2s;
}
.ews-published-app-item:hover {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    background: var(--aws-border-soft);
}
.ews-published-app-icon {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: var(--aws-ink);
    color: var(--aws-bg);
}
.ews-published-app-info { flex: 1; min-width: 0; }
.ews-published-app-name {
    font-size: 12px; font-weight: 700; color: var(--aws-text); margin-bottom: 3px;
}
.ews-published-app-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.ews-publish-source-card {
    background: var(--aws-border-soft);
    border: 1.5px solid var(--aws-border);
    border-radius: 10px; padding: 12px 14px; margin-bottom: 4px;
}
.ews-publish-source-tag {
    font-size: 10px; font-weight: 800; color: var(--aws-text-muted, var(--aws-text-dim));
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px;
}
.ews-publish-source-name {
    font-size: 13px; font-weight: 700; color: var(--aws-text);
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

/* ── HTML Page Picker ─────────────────────────────────── */
.ews-html-pages-picker { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ews-html-page-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border: 1.5px solid var(--aws-border);
    border-radius: 8px; background: var(--aws-input-bg);
    cursor: pointer; transition: all .18s; font-size: 12px; color: var(--aws-text);
}
.ews-html-page-option:hover { border-color: var(--aws-ink-soft, var(--aws-border-hover)); background: var(--aws-border-soft); }
.ews-html-page-option.selected {
    border-color: var(--aws-ink); background: var(--aws-border-soft);
    font-weight: 700; color: var(--aws-text);
}
.ews-html-page-option i { font-size: 10px; color: var(--aws-text-dim); flex-shrink: 0; }

/* ── Icon Picker ──────────────────────────────────────── */
.ews-icon-picker-wrap { position: relative; }
.ews-icon-picker-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border: 1.5px solid var(--aws-border);
    border-radius: 8px; background: var(--aws-input-bg);
    cursor: pointer; width: 100%; box-sizing: border-box;
    font-size: 12px; color: var(--aws-text); transition: border-color .2s;
}
.ews-icon-picker-trigger:hover { border-color: var(--aws-ink-soft, var(--aws-border-hover)); }
.ews-icon-picker-trigger .trigger-label {
    flex: 1; text-align: left; font-family: monospace; font-size: 11px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ews-icon-picker-trigger .trigger-arrow { font-size: 9px; color: var(--aws-text-dim); }

.ews-icon-picker-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--aws-card); border: 1.5px solid var(--aws-border);
    border-radius: 12px; box-shadow: var(--aws-shadow-lg, 0 8px 32px rgba(0,0,0,.18));
    z-index: 99999; overflow: hidden; max-height: 340px;
    display: flex; flex-direction: column;
}
.ews-icon-picker-search {
    padding: 10px 12px; border-bottom: 1px solid var(--aws-border);
    background: var(--aws-card); position: sticky; top: 0; z-index: 1;
}
.ews-icon-picker-search input {
    width: 100%; box-sizing: border-box; padding: 7px 10px;
    border-radius: 7px; border: 1.5px solid var(--aws-border);
    background: var(--aws-input-bg); color: var(--aws-text);
    font-size: 12px; outline: none;
}
.ews-icon-picker-search input:focus { border-color: var(--aws-ink); }
.ews-icon-picker-body { overflow-y: auto; flex: 1; padding: 8px; }
.ews-icon-picker-category { margin-bottom: 10px; }
.ews-icon-picker-cat-label {
    font-size: 9px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .5px; color: var(--aws-text-dim); padding: 0 4px; margin-bottom: 4px;
}
.ews-icon-picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ews-icon-option {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
    transition: all .12s; color: var(--aws-text); font-size: 13px;
}
.ews-icon-option:hover { background: var(--aws-border-soft); color: var(--aws-text); }
.ews-icon-option.selected { background: var(--aws-ink); color: var(--aws-bg); }

/* ── Field Error (rouge conservé — état de danger) ──────── */
.ews-field-error {
    font-size: 11px; color: var(--aws-red, #ef4444);
    display: flex; align-items: center; gap: 5px;
    margin-top: 5px; padding: 6px 10px;
    background: var(--aws-red-bg, rgba(239,68,68,.08)); border-radius: 6px;
    border: 1px solid var(--aws-red, rgba(239,68,68,.2));
}

/* ── BG Type Grid ────────────────────────────────────── */
.ews-bg-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
}
.ews-bg-type-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 10px 6px; border-radius: 10px;
    border: 1.5px solid var(--aws-border); background: var(--aws-input-bg);
    cursor: pointer; transition: all .18s;
    font-size: 10px; font-weight: 600; color: var(--aws-text-dim);
}
.ews-bg-type-btn i { font-size: 15px; }
.ews-bg-type-btn:hover { border-color: var(--aws-ink-soft, var(--aws-border-hover)); color: var(--aws-text); background: var(--aws-border-soft); }
.ews-bg-type-btn.active { border-color: var(--aws-ink); color: var(--aws-text); background: var(--aws-border-soft); font-weight: 700; }

/* ── Animated Background Grid ────────────────────────── */
.ews-animated-bg-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px; margin-top: 8px;
}
.ews-animated-bg-card {
    border-radius: 10px; overflow: hidden;
    border: 2px solid var(--aws-border);
    cursor: pointer; transition: all .2s;
    height: 60px; position: relative;
    background: var(--aws-border-soft);
    filter: grayscale(100%);
}
.ews-animated-bg-card:hover { border-color: var(--aws-ink-soft, var(--aws-border-hover)); transform: scale(1.04); }
.ews-animated-bg-card.selected {
    border-color: var(--aws-ink);
    box-shadow: 0 0 0 2px var(--aws-border-hover, rgba(0,0,0,.1));
    filter: none;
}
.ews-animated-bg-card-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 4px 6px; background: rgba(0,0,0,.45);
    font-size: 9px; font-weight: 800; color: #fff; text-align: center;
}

/* ════════════════════════════════════════════════════════════
   APPEARANCE — CSS Variables & overrides (monochrome)
════════════════════════════════════════════════════════════ */

/* ── Hover effect classes (appliquées sur body) ─────────── */
body.hover-lift  .aws-app-card:hover { transform: translateY(-6px) !important; }
body.hover-glow  .aws-app-card:hover { box-shadow: 0 0 24px var(--aws-border-hover, rgba(0,0,0,.35)) !important; }
body.hover-scale .aws-app-card:hover { transform: scale(1.04) !important; }
body.hover-tilt  .aws-app-card:hover { transform: perspective(600px) rotateY(4deg) rotateX(2deg) !important; }
body.hover-none  .aws-app-card:hover { transform: none !important; box-shadow: var(--aws-shadow-card) !important; }

/* ── Badge radius via CSS var ────────────────────────────── */
.aws-app-badge,
.aws-nav-badge,
.aws-nav-tool-badge,
.aws-shortcut,
.aws-cat-new-badge {
    border-radius: var(--ews-badge-radius, 20px);
    background: var(--aws-border-soft);
    color: var(--aws-text);
    border: 1px solid var(--aws-border);
}

/* ── Canvas BG Grid (dans le panel Customize) ───────────── */
.ews-canvas-bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.ews-canvas-bg-card {
    border-radius: 10px;
    border: 2px solid var(--aws-border);
    cursor: pointer;
    transition: all .2s;
    padding: 14px 8px 10px;
    background: var(--aws-input-bg);
    text-align: center;
}
.ews-canvas-bg-card:hover {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    transform: translateY(-2px);
    background: var(--aws-border-soft);
}
.ews-canvas-bg-card.selected {
    border-color: var(--aws-ink);
    background: var(--aws-border-soft);
    box-shadow: 0 0 0 2px var(--aws-border-hover, rgba(0,0,0,.1));
}
.ews-canvas-bg-card-icon  { font-size: 22px; margin-bottom: 6px; color: var(--aws-text); }
.ews-canvas-bg-card-name  { font-size: 11px; font-weight: 800; color: var(--aws-text); margin-bottom: 2px; }
.ews-canvas-bg-card-desc  { font-size: 9px; color: var(--aws-text-dim); line-height: 1.3; }

/* ── Appearance Tab — Style card grids ──────────────────── */
.ews-preset-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; }
.ews-preset-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.ews-preset-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.ews-preset-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.ews-preset-grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 6px; }

.ews-style-card {
    padding: 10px 8px;
    border-radius: 8px;
    border: 1.5px solid var(--aws-border);
    background: var(--aws-input-bg);
    cursor: pointer;
    transition: all .18s;
    text-align: center;
}
.ews-style-card:hover {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    background: var(--aws-border-soft);
}
.ews-style-card.selected {
    border-color: var(--aws-ink);
    background: var(--aws-border-soft);
    box-shadow: 0 0 0 2px var(--aws-border-hover, rgba(0,0,0,.1));
}
.ews-style-card-name { font-size: 11px; font-weight: 800; color: var(--aws-text); }

/* ── Shadow preview cards ────────────────────────────────── */
.ews-shadow-card {
    padding: 10px;
    border-radius: 8px;
    border: 1.5px solid var(--aws-border);
    background: var(--aws-input-bg);
    cursor: pointer;
    transition: all .18s;
    text-align: center;
}
.ews-shadow-card:hover    { border-color: var(--aws-ink-soft, var(--aws-border-hover)); }
.ews-shadow-card.selected {
    border-color: var(--aws-ink);
    background: var(--aws-border-soft);
}
.ews-shadow-preview {
    width: 40px; height: 28px;
    border-radius: 6px;
    background: var(--aws-card);
    border: 1px solid var(--aws-border);
    margin: 0 auto 6px;
}
.ews-shadow-none   .ews-shadow-preview { box-shadow: none; }
.ews-shadow-subtle .ews-shadow-preview { box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ews-shadow-medium .ews-shadow-preview { box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.ews-shadow-strong .ews-shadow-preview { box-shadow: 0 6px 24px rgba(0,0,0,.22); }
.ews-shadow-glow   .ews-shadow-preview { box-shadow: 0 4px 20px rgba(0,0,0,.3); }

/* ── Dev Apps URL picker ─────────────────────────────────── */
.ews-base-url-section {
    background: var(--aws-border-soft);
    border: 1.5px solid var(--aws-border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
.ews-base-url-header {
    font-size: 11px; font-weight: 800; color: var(--aws-text);
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}
.ews-url-preview {
    font-size: 10px; color: var(--aws-text);
    font-family: monospace;
    background: var(--aws-border-soft);
    border: 1px solid var(--aws-border);
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
    word-break: break-all;
    display: none;
}
.ews-url-preview.visible { display: block; }

/* ── Color system grid (Appearance tab) ──────────────────── */
.ews-color-system-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}
.ews-color-system-item { display: flex; flex-direction: column; gap: 4px; }
.ews-color-system-label {
    font-size: 10px; font-weight: 700;
    color: var(--aws-text-dim);
}

/* ══════════════════════════════════════════════════════════════
   MOBILE SIDEBAR — Override collapsed state when open
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

    #awsSidebar.mobile-open .aws-nav-item-text,
    #awsSidebar.mobile-open .aws-platform-folder .aws-nav-item-text,
    #awsSidebar.mobile-open .aws-nav-tool-link .aws-nav-item-text {
        opacity:        1 !important;
        width:          auto !important;
        pointer-events: auto !important;
    }

    #awsSidebar.mobile-open .aws-nav-label {
        opacity: 1 !important;
    }

    #awsSidebar.mobile-open .aws-nav-badge,
    #awsSidebar.mobile-open .aws-nav-tool-badge {
        opacity: 1 !important;
    }

    #awsSidebar.mobile-open .aws-platform-folder .arrow {
        opacity:        1 !important;
        width:          auto !important;
        pointer-events: auto !important;
    }

    #awsSidebar.mobile-open .aws-platform-folder {
        justify-content: flex-start !important;
        padding: 7px 12px 7px 18px !important;
    }

    #awsSidebar.mobile-open .aws-nav-item {
        justify-content: flex-start !important;
    }

    #awsSidebar.mobile-open .aws-nav-tool-link {
        justify-content: flex-start !important;
        padding: 7px 10px !important;
    }

    #awsSidebar.mobile-open .aws-storage-meter {
        display: block !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-logo {
        justify-content: flex-start !important;
        padding: 14px 16px 12px !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-logo-icon {
        display: none !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-logo-text {
        display: block !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-user-trigger {
        justify-content: flex-start !important;
        padding: 10px 12px !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-user-trigger > * {
        display: flex !important;
    }

    #awsSidebar.mobile-open .aws-sidebar-user-trigger img {
        display: block !important;
    }
}

/* ══════════ VOICE INPUT — Workspace AI Assistant (monochrome) ══════════ */
.aws-gemini-mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1.5px solid var(--aws-border);
    background: var(--aws-input-bg);
    color: var(--aws-text-dim);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s;
    font-size: 13px;
}
.aws-gemini-mic-btn:hover {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    color: var(--aws-text);
}
.aws-gemini-mic-btn.listening {
    background: var(--aws-red-bg, rgba(239,68,68,.12));
    border-color: var(--aws-red, #ef4444);
    color: var(--aws-red, #ef4444);
    animation: awsMicPulse 1.2s ease-in-out infinite;
}
.aws-gemini-mic-btn.processing {
    background: var(--aws-border-soft);
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    color: var(--aws-text);
}
@keyframes awsMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.aws-gemini-mic-transcript {
    font-size: 11px;
    color: var(--aws-text-dim);
    padding: 4px 10px 0;
    display: none;
    align-items: center;
    gap: 6px;
}
.aws-gemini-mic-transcript.active { display: flex; }
.aws-gemini-mic-transcript i { color: var(--aws-red, #ef4444); font-size: 9px; }

.aws-gemini-mic-btn.speaking {
    background: var(--aws-border-soft);
    border-color: var(--aws-ink);
    color: var(--aws-text);
    animation: awsMicSpeaking 1s ease-in-out infinite;
}
@keyframes awsMicSpeaking {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}
.aws-gemini-tts-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1.5px solid var(--aws-border);
    background: var(--aws-input-bg);
    color: var(--aws-text-dim);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s;
    font-size: 11px;
    margin-right: 4px;
}
.aws-gemini-tts-toggle:hover {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    color: var(--aws-text);
}
.aws-gemini-tts-toggle.active {
    background: var(--aws-border-soft);
    border-color: var(--aws-ink);
    color: var(--aws-text);
}

/* ✅ Avatar IA — fond neutre (light) / adaptatif (dark) */
.aws-gemini-msg-avatar.ai {
    background: var(--aws-card);
    border: 1.5px solid var(--aws-border);
    box-shadow: var(--aws-shadow, 0 2px 8px rgba(0,0,0,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 5px;
}
.aws-gemini-msg-avatar.ai img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
}

/* ✅ Avatar dans la bulle "typing..." — même style */
.aws-gemini-typing-avatar {
    background: var(--aws-card);
    border: 1.5px solid var(--aws-border);
    box-shadow: var(--aws-shadow, 0 2px 8px rgba(0,0,0,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 5px;
}
.aws-gemini-typing-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
}

/* ✅ Welcome icon — fond neutre forcé */
.aws-gemini-welcome-icon {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 12px !important;
    background: var(--aws-card) !important;
    background-image: none !important;
    border: 1.5px solid var(--aws-border) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    box-shadow: var(--aws-shadow, 0 2px 10px rgba(0,0,0,0.06)) !important;
}
.aws-gemini-welcome-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    filter: grayscale(100%);
}

.avd-gemini-send-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: avdGeminiSpin 0.7s linear infinite;
}
@keyframes avdGeminiSpin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════
   TRI-LOGO — Icône combinée Claude / OpenAI / Gemini (monochrome)
   ═══════════════════════════════════════════════════════ */
.aws-tri-logo {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}
.aws-tri-logo-img {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--aws-bg);
    border: 1.5px solid var(--aws-ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    filter: grayscale(100%);
}
.aws-tri-logo-c { top: 0;    left: 4px; z-index: 3; }
.aws-tri-logo-o { bottom: 0; left: 0;   z-index: 2; }
.aws-tri-logo-g { bottom: 0; right: 0;  z-index: 1; }

.aws-tri-logo-card {
    width: 26px;
    height: 26px;
}
.aws-tri-logo-card .aws-tri-logo-img {
    width: 15px;
    height: 15px;
    border-color: var(--aws-bg);
}
.aws-tri-logo-card .aws-tri-logo-c { left: 5.5px; }

.aws-tri-logo-white .aws-tri-logo-img {
    border-color: var(--aws-bg);
}

/* ══════════════════════════════════════════════════════════
   THINKING BLOCK — Style minimaliste (monochrome, identique drive)
   ══════════════════════════════════════════════════════════ */
.aa-think {
    margin-bottom: 12px;
    border: 1px solid var(--aws-border);
    border-radius: 12px;
    background: var(--aws-card);
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.aa-think.is-active {
    border-color: var(--aws-ink-soft, var(--aws-border-hover));
    box-shadow: var(--aws-shadow, 0 1px 3px rgba(0,0,0,0.04));
}
.aa-think-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.aa-think-header:hover { background: var(--aws-border-soft); }
.aa-think-icon {
    position: relative;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.aa-think-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.6px solid var(--aws-border);
    border-top-color: var(--aws-text);
    animation: aaRingSpin 0.85s linear infinite;
    opacity: 1;
    transition: opacity .3s ease;
}
.aa-think:not(.is-active) .aa-think-ring { opacity: 0; }
@keyframes aaRingSpin { to { transform: rotate(360deg); } }

@property --think-radius {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}
@property --think-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}
.aa-think-logo {
    width: 13px; height: 13px;
    object-fit: contain;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    opacity: 0.85;
    transition: opacity .3s ease;
    --think-radius: 0%;
    --think-angle: 0deg;

    -webkit-mask-image:
        radial-gradient(circle, #000 62%, transparent 64%),
        conic-gradient(from -90deg, #000 var(--think-angle), transparent var(--think-angle));
            mask-image:
        radial-gradient(circle, #000 62%, transparent 64%),
        conic-gradient(from -90deg, #000 var(--think-angle), transparent var(--think-angle));

    -webkit-mask-size: var(--think-radius) var(--think-radius), 100% 100%;
            mask-size: var(--think-radius) var(--think-radius), 100% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
            mask-repeat: no-repeat, no-repeat;
    -webkit-mask-position: center, center;
            mask-position: center, center;

    -webkit-mask-composite: source-in;
            mask-composite: intersect;
}
.aa-think.is-active .aa-think-logo {
    animation: aaLogoReveal 1.6s cubic-bezier(.45,0,.55,1) infinite;
}
.aa-think:not(.is-active) .aa-think-logo {
    --think-radius: 160%;
    --think-angle: 360deg;
    opacity: 1;
}
@keyframes aaLogoReveal {
    0%   { --think-radius: 0%;   --think-angle: 0deg;   opacity: 0;    }
    12%  { opacity: 1; }
    55%  { --think-radius: 160%; --think-angle: 360deg; opacity: 1;    }
    78%  { --think-radius: 160%; --think-angle: 360deg; opacity: 1;    }
    100% { --think-radius: 160%; --think-angle: 360deg; opacity: 0.15; }
}
.aa-think-label {
    flex: 1;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aws-text);
    letter-spacing: 0.1px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.aa-think-dots { display: inline-flex; gap: 2px; margin-left: 2px; }
.aa-think-dots i {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--aws-text-dim);
    animation: aaThinkDot 1.1s ease-in-out infinite;
    display: inline-block;
}
.aa-think-dots i:nth-child(2) { animation-delay: .15s; }
.aa-think-dots i:nth-child(3) { animation-delay: .3s; }
.aa-think:not(.is-active) .aa-think-dots { display: none; }
@keyframes aaThinkDot {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40%           { opacity: 1;   transform: translateY(-1.5px); }
}
.aa-think-chev {
    font-size: 10px;
    color: var(--aws-text-dim);
    transition: transform .25s ease;
    flex-shrink: 0;
}
.aa-think.is-open .aa-think-chev { transform: rotate(180deg); }
.aa-think-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.aa-think.is-open .aa-think-body { max-height: 260px; overflow-y: auto; }
.aa-think-text {
    padding: 2px 14px 14px 42px;
    font-size: 12px;
    line-height: 1.65;
    color: var(--aws-text-dim);
    font-style: italic;
    white-space: pre-wrap;
    border-top: 1px solid var(--aws-border-soft);
    margin-top: 2px;
    padding-top: 10px;
}

/* ── Typewriter streaming cursor (monochrome) ── */
.aa-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--aws-ink);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: aaCursorBlink 0.8s step-end infinite;
}
@keyframes aaCursorBlink {
    0%, 50%  { opacity: 1; }
    51%, 100% { opacity: 0; }
}
/* ── Slot injecté dans chaque bulle IA en attente du thinking ── */
.aws-gemini-msg-bubble .aa-think-slot:empty { display: none; }

/* ══════════════════════════════════════════════════════════════
   FIX — AI ASSISTANT : design clair, messages sans fond gris
══════════════════════════════════════════════════════════════ */

/* Section globale — fond blanc pur au lieu de --aws-card sombre */
.aws-gemini-section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

body.light-mode .aws-gemini-section {
    background: #ffffff;
    border-color: #e5e5e5;
}

/* Dark mode : fond clair type "carte flottante" au lieu du noir ambiant */
body:not(.light-mode) .aws-gemini-section {
    background: #1c1c1e;
    border-color: #2e2e30;
}

/* Header — fond neutre très clair, pas gris foncé */
.aws-gemini-header {
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
}
body:not(.light-mode) .aws-gemini-header {
    background: #232325;
    border-bottom-color: #2e2e30;
}

/* Messages zone */
.aws-gemini-messages {
    background: transparent;
}

/* Bulle IA — fond blanc/quasi-blanc au lieu du gris (--aws-border) */
.aws-gemini-msg.ai .aws-gemini-msg-bubble {
    background: #f7f7f8;
    border: 1px solid #ececec;
    color: #1a1a1a;
}
body:not(.light-mode) .aws-gemini-msg.ai .aws-gemini-msg-bubble {
    background: #262628;
    border-color: #333335;
    color: #f0f0f0;
}

/* Bulle utilisateur — reste sur l'ink foncé/clair du thème, inchangé */
.aws-gemini-msg.user .aws-gemini-msg-bubble {
    background: var(--aws-ink);
    color: var(--aws-bg);
}

/* Input bar — fond clair au lieu du gris foncé */
.aws-gemini-input-bar {
    background: #fafafa;
    border-top: 1px solid #eeeeee;
}
body:not(.light-mode) .aws-gemini-input-bar {
    background: #232325;
    border-top-color: #2e2e30;
}

/* Chips zone — fond clair */
.aws-gemini-chips {
    border-top: 1px solid #eeeeee;
}
body:not(.light-mode) .aws-gemini-chips {
    border-top-color: #2e2e30;
}

.aws-gemini-chip {
    background: #f5f5f5;
    border-color: #e5e5e5;
    color: #555;
}
body:not(.light-mode) .aws-gemini-chip {
    background: #262628;
    border-color: #333335;
    color: #b0b0b0;
}

.aws-gemini-chip:hover {
    background: #eaeaea;
    color: #111;
}
body:not(.light-mode) .aws-gemini-chip:hover {
    background: #2e2e30;
    color: #fff;
}

/* Typing dots bulle — fond clair aussi */
.aws-gemini-typing-dots {
    background: #f7f7f8;
    border-color: #ececec;
}
body:not(.light-mode) .aws-gemini-typing-dots {
    background: #262628;
    border-color: #333335;
}

/* Action buttons dans les messages */
.aws-gemini-action-btn {
    background: #f5f5f5;
    border-color: #e5e5e5;
    color: #333;
}
body:not(.light-mode) .aws-gemini-action-btn {
    background: #262628;
    border-color: #333335;
    color: #ddd;
}
.aws-gemini-action-btn:hover {
    border-color: #c9c9c9;
}

/* ══════════════════════════════════════════════════════════════
   FIX RENFORCÉ — Centrage TOTAL de tous les éléments sidebar collapsed
══════════════════════════════════════════════════════════════ */

/* Règle universelle : tout lien/item direct dans la sidebar collapsed */
#awsSidebar.collapsed .aws-sidebar-scroll a,
#awsSidebar.collapsed .aws-sidebar-scroll button,
#awsSidebar.collapsed .aws-sidebar-scroll > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Nav items */
#awsSidebar.collapsed .aws-nav-item,
#awsSidebar.collapsed .aws-nav-tool-link,
#awsSidebar.collapsed .aws-platform-link,
#awsSidebar.collapsed .aws-platform-folder {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 0 !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
    width: calc(100% - 12px) !important;
}

/* Toutes les icônes (quel que soit leur type : i, img, div) */
#awsSidebar.collapsed .aws-nav-item-icon,
#awsSidebar.collapsed .aws-nav-tool-icon,
#awsSidebar.collapsed .aws-platform-link i,
#awsSidebar.collapsed .aws-platform-folder > i:first-child,
#awsSidebar.collapsed [class*="icon"] {
    margin: 0 auto !important;
    flex-shrink: 0 !important;
}

/* Cas des liens de sous-menu affichés directement (padding-left qui décale à gauche) */
#awsSidebar.collapsed .aws-platform-link {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Masquer complètement les sous-menus ouverts en mode collapsed (évite le décalage visuel) */
#awsSidebar.collapsed .aws-platform-submenu {
    display: none !important;
}

/* Sécurité : neutralise tout texte/badge résiduel qui pousserait l'icône à gauche */
#awsSidebar.collapsed .aws-nav-item-text,
#awsSidebar.collapsed .aws-nav-badge,
#awsSidebar.collapsed .aws-nav-tool-badge,
#awsSidebar.collapsed .aws-platform-link-badge,
#awsSidebar.collapsed .arrow {
    display: none !important;
    width: 0 !important;
    opacity: 0 !important;
}

/* Storage meter et labels également neutralisés */
#awsSidebar.collapsed .aws-nav-label,
#awsSidebar.collapsed .aws-storage-meter {
    display: none !important;
}

/* User trigger tout en bas */
#awsSidebar.collapsed .aws-sidebar-user-trigger {
    display: flex !important;
    justify-content: center !important;
    padding: 10px 0 !important;
    gap: 0 !important;
}
#awsSidebar.collapsed .aws-sidebar-user-trigger > *:not(img) {
    display: none !important;
}

/* ── Tri-logo : couleurs d'origine conservées ── */
.aws-tri-logo-img {
    filter: none !important;
}

/* ── Thinking block logo (Claude) : couleur d'origine conservée ── */
.aa-think-logo {
    filter: none !important;
    opacity: 1 !important;
}

/* ── Badge logo Gemini dans l'assistant : couleur d'origine ── */
.aws-gemini-badge-logo {
    filter: none !important;
}

/* ── Avatars messages IA : couleur d'origine ── */
.aws-gemini-msg-avatar.ai img,
.aws-gemini-typing-avatar img,
.aws-gemini-welcome-icon img {
    filter: none !important;
}

/* ══════════════════════════════════════════════════════════════
   35. GLASS SILVER SYSTEM — Harmonisation avec landing-institutional
   Boutons + Hero Card en verre argenté dégradé (light & dark)
══════════════════════════════════════════════════════════════ */

:root{
    --aws-glass-bg:        rgba(255,255,255,.10);
    --aws-glass-bg-hover:  rgba(255,255,255,.18);
    --aws-glass-border:    rgba(255,255,255,.22);
    --aws-glass-border-hv: rgba(255,255,255,.38);
    --aws-glass-shadow:    0 8px 24px rgba(0,0,0,.18);
    --aws-glass-inset:     inset 0 1px 0 rgba(255,255,255,.14);
    --aws-glass-grad:      linear-gradient(135deg, rgba(255,255,255,.22), rgba(203,213,225,.06));
    --aws-glass-grad-hv:   linear-gradient(135deg, rgba(255,255,255,.30), rgba(203,213,225,.10));
}

/* Light mode : verre plus sombre/neutre pour rester lisible sur fond clair */
body.light-mode{
    --aws-glass-bg:        rgba(10,10,10,.05);
    --aws-glass-bg-hover:  rgba(10,10,10,.09);
    --aws-glass-border:    rgba(10,10,10,.12);
    --aws-glass-border-hv: rgba(10,10,10,.22);
    --aws-glass-shadow:    0 8px 20px rgba(0,0,0,.08);
    --aws-glass-inset:     inset 0 1px 0 rgba(255,255,255,.6);
    --aws-glass-grad:      linear-gradient(135deg, rgba(255,255,255,.9), rgba(226,232,240,.55));
    --aws-glass-grad-hv:   linear-gradient(135deg, rgba(255,255,255,1), rgba(226,232,240,.75));
}

/* ── Boutons primaires — verre argenté dégradé ─────────────────── */
.aws-btn-primary,
.aws-app-card-cta,
.aws-team-cta-btn,
.ews-btn-primary,
.aws-mcp-send,
.aws-gemini-send,
.aws-app-row-btn.primary{
    background: var(--aws-glass-grad) !important;
    color: var(--aws-text) !important;
    border: 1px solid var(--aws-glass-border) !important;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: var(--aws-glass-inset), var(--aws-glass-shadow);
    position: relative;
    overflow: hidden;
    transition: var(--aws-transition-sm);
}
.aws-btn-primary::before,
.aws-app-card-cta::before,
.aws-team-cta-btn::before,
.ews-btn-primary::before{
    content:'';
    position:absolute; top:0; left:0; right:0; height:1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
    pointer-events:none;
}
.aws-btn-primary:hover,
.aws-app-card-cta:hover,
.aws-team-cta-btn:hover,
.ews-btn-primary:hover:not(:disabled),
.aws-mcp-send:hover,
.aws-gemini-send:hover:not(:disabled),
.aws-app-row-btn.primary:hover{
    background: var(--aws-glass-grad-hv) !important;
    border-color: var(--aws-glass-border-hv) !important;
    transform: translateY(-1px);
    box-shadow: var(--aws-glass-inset), 0 12px 32px rgba(0,0,0,.22);
    opacity: 1 !important;
}

/* ── Boutons secondaires / header / outline — verre plus léger ──── */
.aws-btn-secondary,
.aws-header-btn,
.aws-shortcut,
.aws-theme-toggle,
.aws-view-toggle,
.aws-view-btn,
.aws-sort-wrap .aws-header-btn,
.ews-btn-ghost,
.ews-icon-btn,
.ews-app-action-btn,
.aws-app-row-btn:not(.primary),
.aws-mcp-chip,
.aws-cat-card-app-chip,
.aws-gemini-chip,
.aws-gemini-tts-toggle,
.aws-gemini-mic-btn,
.aws-customize-btn,
.ews-customize-btn{
    background: var(--aws-glass-bg) !important;
    border: 1px solid var(--aws-glass-border) !important;
    color: var(--aws-text-dim) !important;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    box-shadow: var(--aws-glass-inset);
    transition: var(--aws-transition-sm);
}
.aws-btn-secondary:hover,
.aws-header-btn:hover,
.aws-shortcut:hover,
.aws-theme-toggle:hover,
.aws-view-btn:hover,
.ews-btn-ghost:hover,
.ews-icon-btn:hover,
.ews-app-action-btn:hover,
.aws-app-row-btn:not(.primary):hover,
.aws-mcp-chip:hover,
.aws-cat-card-app-chip:hover,
.aws-gemini-chip:hover,
.aws-gemini-tts-toggle:hover,
.aws-gemini-mic-btn:hover,
.aws-customize-btn:hover,
.ews-customize-btn:hover{
    background: var(--aws-glass-bg-hover) !important;
    border-color: var(--aws-glass-border-hv) !important;
    color: var(--aws-text) !important;
}

/* États actifs (view toggle, sort option, secondary.active…) restent lisibles */
.aws-view-btn.active,
.aws-btn-secondary.active,
.ews-app-action-btn.active,
.aws-sort-option.active,
.aws-app-row-btn.active{
    background: var(--aws-glass-grad) !important;
    color: var(--aws-text) !important;
    border-color: var(--aws-glass-border-hv) !important;
    box-shadow: var(--aws-glass-inset), var(--aws-glass-shadow);
}

/* Ghost buttons restent transparents mais avec léger halo au survol */
.aws-btn-ghost:hover{
    background: var(--aws-glass-bg) !important;
    backdrop-filter: blur(8px);
}

/* Sidebar toggle rond + mobile close — même traitement verre */
.aws-sidebar-toggle,
.aws-mobile-close-btn{
    background: var(--aws-glass-bg) !important;
    border: 1px solid var(--aws-glass-border) !important;
    backdrop-filter: blur(10px) saturate(150%);
    box-shadow: var(--aws-glass-inset), var(--aws-glass-shadow);
}
.aws-sidebar-toggle:hover{
    background: var(--aws-glass-grad-hv) !important;
    color: var(--aws-text) !important;
    border-color: var(--aws-glass-border-hv) !important;
}
.aws-mobile-close-btn:hover{
    background: var(--aws-red-bg) !important;
    border-color: var(--aws-red) !important;
    color: var(--aws-red) !important;
}

/* Désactive les vieux dégradés/opacités par défaut des .aws-btn */
.aws-btn:disabled{ opacity:.45 !important; }

/* ══════════════════════════════════════════════════════════════
   36. HERO CARD "Good morning" — verre argenté dégradé
══════════════════════════════════════════════════════════════ */
.aws-home-hero{
    background: var(--aws-glass-grad) !important;
    border: 1px solid var(--aws-glass-border) !important;
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    box-shadow: var(--aws-glass-inset), var(--aws-glass-shadow);
    position: relative;
    overflow: hidden;
}
.aws-home-hero::before{
    content:'';
    position:absolute; top:0; left:0; right:0; height:1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
    pointer-events:none;
}

/* Boutons dans la hero → cohérence garantie via règles ci-dessus
   (.aws-btn-primary / .aws-btn-secondary héritent déjà du glass) */

/* ══════════════════════════════════════════════════════════════
   37. AI ASSISTANT SECTION — top bar en léger verre argenté
══════════════════════════════════════════════════════════════ */
.aws-gemini-section::before{
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent) !important;
    opacity: 1 !important;
}

/* ══════════════════════════════════════════════════════════════
   38. SIDEBAR — Glass argenté sur nav items / folders / tool links
══════════════════════════════════════════════════════════════ */

.aws-nav-item:hover,
.aws-nav-tool-link:hover,
.aws-platform-folder:hover,
.aws-platform-link:hover,
.aws-platform-link.active,
.aws-sidebar-user-trigger:hover{
    background: var(--aws-glass-bg) !important;
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
}

/* Item actif = glass fort avec dégradé argenté (au lieu du bloc plein --aws-sidebar-active) */
.aws-nav-item.active{
    background: var(--aws-glass-grad) !important;
    color: var(--aws-text) !important;
    border: 1px solid var(--aws-glass-border-hv);
    box-shadow: var(--aws-glass-inset), var(--aws-glass-shadow);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
}
.aws-nav-item.active .aws-nav-item-icon,
.aws-nav-item.active .aws-nav-item-text{
    color: var(--aws-text) !important;
}
.aws-nav-item.active .aws-nav-badge{
    background: rgba(255,255,255,.16) !important;
    color: var(--aws-text) !important;
    border-color: var(--aws-glass-border);
}

/* Folder ouvert (Platform sections) */
.aws-platform-folder.open{
    background: var(--aws-glass-bg) !important;
    color: var(--aws-text) !important;
}

/* Icônes nav-tool (Drive, Agent Builder, Code IDE...) gardent leur couleur
   d'accent mais avec un fond verre plutôt que plein */
.aws-nav-tool-icon{
    backdrop-filter: blur(6px);
}

/* ══════════════════════════════════════════════════════════════
   39. FIX — Bouton "Customize Workspace" (ews-customize-btn)
   Redonne un contraste fort (glass "premium pill" bien visible,
   quel que soit le fond derrière), au lieu du glass trop léger
   hérité de la règle générale .aws-header-btn / boutons secondaires
══════════════════════════════════════════════════════════════ */

.ews-customize-btn{
    background: var(--aws-glass-grad-hv) !important;
    border: 1.5px solid var(--aws-glass-border-hv) !important;
    color: var(--aws-text) !important;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: var(--aws-glass-inset), 0 12px 32px rgba(0,0,0,.28) !important;
    font-weight: 800;
}

/* Halo lumineux type "liseré verre" en haut du bouton, comme les cards
   de landing-institutional, pour qu'il ressorte bien du fond */
.ews-customize-btn::before{
    content:'';
    position:absolute;
    top:0; left:12px; right:12px; height:1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
    pointer-events:none;
}
.ews-customize-btn{ position: fixed; } /* garantit le positioning-context pour ::before */

.ews-customize-btn:hover{
    background: var(--aws-glass-grad-hv) !important;
    border-color: rgba(255,255,255,.5) !important;
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--aws-glass-inset), 0 16px 40px rgba(0,0,0,.35) !important;
}
.ews-customize-btn:active{ transform: scale(0.97); }

/* Assure qu'il reste au-dessus de tout (sidebar, panels, modals à z-index élevé) */
.ews-customize-btn{ z-index: 9999 !important; }

/* En light mode, on renforce encore un peu le contraste du texte/icone */
body.light-mode .ews-customize-btn{
    color: #0a0a0a !important;
    border-color: rgba(10,10,10,.22) !important;
}

/* ══════════════════════════════════════════════════════════════
   40. FIX DÉFINITIF — Bouton Customize Workspace (spécificité forcée)
   Écrase toute règle précédente (y compris section 35) qui aurait
   pu appliquer un glass trop léger sur .ews-customize-btn
══════════════════════════════════════════════════════════════ */

body .ews-customize-btn,
body.light-mode .ews-customize-btn,
html body .ews-customize-btn {
    display:            flex !important;
    visibility:          visible !important;
    opacity:             1 !important;
    pointer-events:      auto !important;

    position:            fixed !important;
    bottom:               28px !important;
    right:                28px !important;
    z-index:            99999 !important;

    align-items:        center !important;
    gap:                    8px !important;
    padding:          12px 18px !important;

    background:    var(--aws-glass-grad-hv, linear-gradient(135deg, rgba(255,255,255,.30), rgba(203,213,225,.10))) !important;
    border:      1.5px solid var(--aws-glass-border-hv, rgba(255,255,255,.38)) !important;
    border-radius:         50px !important;

    color:      var(--aws-text) !important;
    font-size:              12px !important;
    font-weight:            800 !important;
    font-family:          inherit !important;

    backdrop-filter:       blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 32px rgba(0,0,0,.28) !important;

    cursor: pointer !important;
}

body.light-mode .ews-customize-btn {
    color: #0a0a0a !important;
    border-color: rgba(10,10,10,.22) !important;
}

body .ews-customize-btn:hover {
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 16px 40px rgba(0,0,0,.35) !important;
}

body .ews-customize-btn-icon,
body .ews-customize-btn-label {
    color: inherit !important;
    opacity: 1 !important;
}

@media (max-width: 600px) {
    body .ews-customize-btn {
        bottom: 16px !important;
        right:  16px !important;
        width:  46px !important;
        height: 46px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }
    body .ews-customize-btn-label { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   41. FIX — Masquer le bouton Customize quand le panel est ouvert
══════════════════════════════════════════════════════════════ */
body:has(.ews-config-panel.open) .ews-customize-btn,
html:has(.ews-config-panel.open) .ews-customize-btn {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.85) translateY(8px) !important;
}