/*
 * ============================================================
 *  TecHub Design System — techub-ds.css
 *  Fonte canônica de tokens e componentes do ecossistema.
 *  Gerado de design-system.md — atualize ambos em sincronia.
 *
 *  Como usar:
 *    Django templates : <link rel="stylesheet" href="{% static 'css/techub-ds.css' %}">
 *    SPA (React/Vue)  : import '/public/techub-ds.css'  (copiar no build)
 *    URL absoluta     : https://techub.megalinkpiaui.com.br/static/css/techub-ds.css
 *
 *  Convenções:
 *    — Nunca use cores hardcoded: sempre var(--ds-*)
 *    — Nunca use !important fora das classes .ds-text-* e utilitários
 *    — Todo novo componente entra aqui antes de ir para a app
 * ============================================================
 */

/* ============================================================
   1. DESIGN TOKENS — Custom Properties
   ============================================================ */

:root {

    /* ── Cores Primárias ── */
    --ds-primary:         #000b4a;   /* Navy escuro — cor principal do ecossistema     */
    --ds-primary-rgb:     0, 11, 74; /* Versão RGB para rgba()                         */
    --ds-primary-dark:    #0018b0;   /* Hover / estado ativo                           */
    --ds-primary-blue:    #0022fa;   /* Azul vibrante — formulários modernos           */
    --ds-primary-light:   #eef2ff;   /* Fundo sutil de destaque primary                */
    --ds-accent:          #ff6b00;   /* Laranja de destaque                            */

    /* ── Cores Secundárias ── */
    --ds-secondary:       #f59e0b;   /* Âmbar/dourado — CTAs, badges, realces          */
    --ds-secondary-rgb:   245, 158, 11;

    /* ── Texto ── */
    --ds-text-main:       #1e293b;   /* Slate-800 — títulos                            */
    --ds-text-body:       #374151;   /* Corpo de texto                                 */
    --ds-text-muted:      #64748b;   /* Metadados, labels                              */
    --ds-text-light:      #94a3b8;   /* Placeholder, disabled                          */
    --ds-text-white:      #ffffff;

    /* ── Backgrounds ── */
    --ds-bg-page:         #f8fafc;   /* Fundo de página (dashboard)                    */
    --ds-bg-card:         #ffffff;   /* Cards                                          */
    --ds-bg-dark:         #000b4a;   /* Fundo escuro (área do membro)                  */
    --ds-bg-subtle:       #f1f5f9;   /* Hover leve                                     */

    /* ── Bordas ── */
    --ds-border:          #e5e7eb;   /* Gray-200                                       */
    --ds-border-light:    #f3f4f6;   /* Divisores sutis                                */

    /* ── Semântica ── */
    --ds-success:         #10b981;
    --ds-success-light:   #ecfdf5;
    --ds-success-dark:    #065f46;
    --ds-danger:          #ef4444;
    --ds-danger-light:    #fef2f2;
    --ds-danger-dark:     #991b1b;
    --ds-warning:         #f59e0b;
    --ds-warning-light:   #fffbeb;
    --ds-warning-dark:    #92400e;
    --ds-info:            #6366f1;
    --ds-info-light:      #eef2ff;
    --ds-info-dark:       #1e40af;

    /* ── Border Radius ── */
    --ds-radius-sm:       8px;       /* Botões, inputs, badges                         */
    --ds-radius-md:       12px;      /* Cards, modais, selects                         */
    --ds-radius-lg:       20px;      /* Card-page, hub-cards                           */
    --ds-radius-xl:       24px;      /* Modais grandes, containers                     */
    --ds-radius-full:     50%;       /* Avatares, dots                                 */

    /* ── Sombras ── */
    --ds-shadow-sm:       0 1px 3px rgba(0,0,0,0.08);
    --ds-shadow-md:       0 8px 30px rgba(0,0,0,0.15);
    --ds-shadow-lg:       0 20px 60px rgba(0,0,0,0.20);
    --ds-shadow-xl:       0 20px 60px rgba(0,0,0,0.30);
    --ds-shadow-btn:      0 4px 12px rgba(245,158,11,0.4);
    --ds-shadow-nav:      0 10px 36px rgba(0,0,0,0.15);

    /* ── Tipografia ── */
    --ds-font-body:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ds-font-display:    'Poppins', 'Inter', sans-serif;
    --ds-font-mono:       'SF Mono', 'Fira Code', monospace;

    /* ── Transições ── */
    --ds-transition:      0.2s ease;
    --ds-transition-fast: 0.15s ease;

    /* ── Layout ── */
    --ds-topbar-height:   52px;
    --ds-sidebar-width:   220px;
    --ds-sidebar-collapsed-width: 85px;
    --ds-container-max:   1200px;

    /* ── Espaçamento (base 4px) ── */
    --ds-space-2:   2px;
    --ds-space-4:   4px;
    --ds-space-6:   6px;
    --ds-space-8:   8px;
    --ds-space-10:  10px;
    --ds-space-12:  12px;
    --ds-space-14:  14px;
    --ds-space-16:  16px;
    --ds-space-18:  18px;
    --ds-space-20:  20px;
    --ds-space-24:  24px;
    --ds-space-28:  28px;
    --ds-space-32:  32px;
    --ds-space-36:  36px;
    --ds-space-40:  40px;
    --ds-space-48:  48px;
    --ds-space-56:  56px;
    --ds-space-64:  64px;
}


/* ============================================================
   2. BASE
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: var(--ds-font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ds-text-body);
    background: var(--ds-bg-page);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Web Component FOUC guard ──
 * Esconde slots das apps atÃ© o <techub-shell> ser definido.
 */
techub-shell:not(:defined) {
    display: block;
    min-height: 100vh;
    background: var(--ds-bg-page);
}
techub-shell:not(:defined) > [slot] {
    display: none;
}

.ds-body {
    font-family: var(--ds-font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ds-text-body);
    background: var(--ds-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   3. TIPOGRAFIA
   ============================================================ */

.ds-display {
    font-family: var(--ds-font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ds-h1 { font-size: 38px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--ds-text-main); }
.ds-h2 { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--ds-text-main); }
.ds-h3 { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--ds-text-main); }

.ds-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ds-text-main);
    letter-spacing: -0.02em;
}

.ds-page-subtitle {
    font-size: 14px;
    color: var(--ds-text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.ds-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ds-text-main);
    margin-bottom: 20px;
}

.ds-section-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ds-text-main);
}

.ds-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ds-text-muted);
}


/* ============================================================
   4. LAYOUT — App Shell (topbar + sidebar + main)
   ============================================================ */

/* Wrapper geral */
.ds-app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
}

.ds-app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.ds-layout-body {
    position: relative;
    z-index: 1;
}

.ds-app {
    position: relative;
    z-index: 1;
}

.ds-shell-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.ds-layout-body {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ds-shell-content-slot {
    display: block;
    width: 100%;
    min-width: 0;
}

.ds-shell-brand-slot {
    display: inline-flex;
    align-items: center;
}

.ds-shell-modules-slot {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: max-content;
}

/* Wrapper intermediário do slot (o <div slot="modules"> do template) */
.ds-shell-modules-slot > div {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.ds-shell-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ds-shell-sidebar-slot {
    width: 100%;
}

/* ── Topbar ── */
.ds-topbar {
    display: flex;
    align-items: center;
    height: var(--ds-topbar-height);
    background: var(--ds-bg-card);
    border-bottom: 1px solid var(--ds-border);
    padding: 0 20px;
    flex-shrink: 0;
    gap: 8px;
    z-index: 100;
    position: relative;
}

.ds-topbar-brand {
    font-size: 16px;
    font-weight: 800;
    color: var(--ds-text-main);
    margin-right: 24px;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 0;
}

.ds-topbar-brand:hover { color: var(--ds-primary); }

.ds-topbar-brand-logo {
    display: flex;
    align-items: center;
    width: 144px;
    height: 100%;
    overflow: hidden;
    transition: width var(--ds-transition);
}

.ds-topbar-brand-logo img {
    display: block;
    width: 144px;
    height: auto;
    max-width: none;
    flex-shrink: 0;
    object-fit: contain;
    object-position: left center;
}


.ds-topbar-brand-text {
    display: inline-flex;
    align-items: center;
    color: inherit;
}

.ds-topbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.ds-topbar-nav::-webkit-scrollbar { display: none; }

.ds-topbar-nav > * { flex-shrink: 0; }

.ds-topbar-sep {
    width: 1px;
    height: 20px;
    background: var(--ds-border);
    margin: 0 4px;
}

/* Abas de módulo na topbar */
.ds-topbar-module {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ds-text-muted);
    border-radius: var(--ds-radius-sm);
    transition: all var(--ds-transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.ds-topbar-module:hover {
    background: var(--ds-border-light);
    color: var(--ds-text-body);
}

.ds-topbar-module.active {
    background: var(--ds-primary);
    color: var(--ds-text-white);
    font-weight: 600;
}

.ds-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ds-shell-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    background: var(--ds-bg-card);
    color: var(--ds-text-muted);
    cursor: pointer;
    transition: background var(--ds-transition-fast), border-color var(--ds-transition-fast), color var(--ds-transition-fast);
}

.ds-shell-menu-btn:hover {
    background: var(--ds-bg-subtle);
    color: var(--ds-text-body);
    border-color: #ccc;
}

.ds-shell-sidebar-overlay {
    display: none;
    position: fixed;
    inset: var(--ds-topbar-height) 0 0 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ds-transition), visibility var(--ds-transition);
    z-index: 110;
}

/* ── Sidebar ── */
.ds-sidebar {
    width: var(--ds-sidebar-width);
    background: var(--ds-bg-card);
    border-right: 1px solid var(--ds-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    cursor: pointer;
    transition: width var(--ds-transition), border-color var(--ds-transition);
}

.ds-sidebar:hover {
    border-right-color: var(--ds-text-light);
}

.ds-sidebar.collapsed {
    width: var(--ds-sidebar-collapsed-width);
    padding: 6px;
    overflow: visible;
}

.ds-sidebar.collapsed .ds-nav-item span,
.ds-sidebar.collapsed .ds-sidebar-section-label {
    display: none;
}

.ds-sidebar.collapsed .ds-nav-item {
    padding: 8px;
    justify-content: center;
}

.ds-sidebar.collapsed .ds-nav-item i {
    width: auto;
    font-size: 16px;
}

.ds-sidebar.collapsed .ds-sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ds-sidebar.collapsed .ds-nav-item,
.ds-sidebar.collapsed .ds-sidebar-section-label {
    position: relative;
}

.ds-sidebar.collapsed .ds-nav-item::after,
.ds-sidebar.collapsed .ds-sidebar-section-label::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--ds-bg-card);
    color: var(--ds-text-main);
    padding: 6px 12px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-shadow-md);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 300;
}

.ds-sidebar.collapsed .ds-nav-item:hover::after,
.ds-sidebar.collapsed .ds-sidebar-section-label:hover::after {
    opacity: 1;
}

/* Collapsed sidebar — logo adapta para mostrar apenas a marca */
.ds-sidebar-collapsed .ds-topbar-brand-logo {
    width: 48px;
}
.ds-sidebar-collapsed .ds-topbar-brand-logo img {
    /* Mantém o width explícito do img para não redimensionar, o container esconde o resto */
    width: 130px;
    height: auto;
    object-position: left center;
}

/* Main content margin ajusta automaticamente (sidebar encolhe) */

.ds-sidebar-nav {
    flex: 1;
    min-width: 0;
}

.ds-sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ds-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 14px 8px 17px;
}

/* Item de navegação na sidebar */
.ds-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--ds-text-muted);
    border-radius: var(--ds-radius-sm);
    margin-bottom: 2px;
    transition: all var(--ds-transition-fast);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.ds-nav-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.ds-nav-item:hover {
    background: var(--ds-border-light);
    color: var(--ds-text-body);
}

.ds-nav-item.active {
    color: var(--ds-primary-blue);
    background: var(--ds-primary-light);
    font-weight: 600;
}

.ds-nav-item-disabled {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--ds-text-muted);
    border-radius: var(--ds-radius-sm);
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.6;
    cursor: not-allowed;
}

.ds-nav-item-disabled i {
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.ds-nav-item-child {
    padding-left: var(--ds-space-20);
}

.ds-sidebar.collapsed .ds-nav-item-child {
    padding-left: 8px;
}

/* ── Main Content ── */
.ds-main-content {
    flex: 1;
    padding: var(--ds-space-24) var(--ds-space-32);
    overflow-y: auto;
    background: transparent;
    min-width: 0;
}

.ds-page-header {
    margin-bottom: 28px;
}

/* Área do membro (landing / customer-facing) */
.ds-member-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px;
}

@media (min-width: 768px)  { .ds-member-container { max-width: 800px; padding: 32px 24px; } }
@media (min-width: 1024px) { .ds-member-container { max-width: 900px; padding: 40px 32px; } }

/* Botão de voltar (área do membro — fundo escuro) */
.ds-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    transition: color var(--ds-transition-fast);
    text-decoration: none;
}
.ds-btn-back:hover { color: #fff; }


/* ============================================================
   5. BOTÕES
   ============================================================ */

.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--ds-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ds-font-body);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--ds-transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.ds-btn:hover  { transform: translateY(-1px); }
.ds-btn:active { transform: translateY(0); }
.ds-btn:focus-visible { outline: 3px solid rgba(var(--ds-primary-rgb), 0.35); outline-offset: 2px; }
.ds-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; pointer-events: none; }

/* Variantes */
.ds-btn-primary {
    background: var(--ds-primary);
    color: var(--ds-text-white);
    border-color: var(--ds-primary);
}
.ds-btn-primary:hover {
    opacity: 0.92;
    box-shadow: 0 4px 12px rgba(var(--ds-primary-rgb), 0.35);
    color: var(--ds-text-white);
}

.ds-btn-secondary {
    background: var(--ds-bg-card);
    color: var(--ds-text-body);
    border-color: var(--ds-border);
}
.ds-btn-secondary:hover {
    background: var(--ds-bg-subtle);
    color: var(--ds-text-main);
}

.ds-btn-danger {
    background: var(--ds-danger-light);
    color: var(--ds-danger-dark);
    border-color: #fecaca;
}
.ds-btn-danger:hover { background: #fee2e2; }

.ds-btn-ghost {
    background: transparent;
    color: var(--ds-text-muted);
    border-color: transparent;
}
.ds-btn-ghost:hover { background: var(--ds-bg-subtle); color: var(--ds-text-body); }

.ds-btn-cta {
    background: var(--ds-secondary);
    color: var(--ds-primary);
    border-color: var(--ds-secondary);
    padding: 12px 24px;
    font-weight: 700;
}
.ds-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--ds-shadow-btn);
    color: var(--ds-primary);
}

/* Tamanhos */
.ds-btn-xs   { padding: 4px 8px;    font-size: 11px; }
.ds-btn-sm   { padding: 5px 10px;   font-size: 12px; }
.ds-btn-lg   { padding: 14px 24px;  font-size: 16px; }
.ds-btn-full { width: 100%; justify-content: center; }

/* Botão de grande ação (ex: girar roleta) */
.ds-btn-spin {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 20px auto 0;
    padding: 16px 20px;
    background: var(--ds-primary);
    color: var(--ds-text-white);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--ds-font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--ds-primary-rgb), 0.3);
    transition: all var(--ds-transition);
}
.ds-btn-spin:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--ds-primary-rgb), 0.4); }
.ds-btn-spin:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }


/* ============================================================
   6. CARDS
   ============================================================ */

/* Card base — dashboard / admin */
.ds-card {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-border);
    padding: 24px;
}

/* Stat Card — KPI */
.ds-stat-card {
    background: var(--ds-bg-card);
    padding: 20px 24px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-border);
    display: flex;
    flex-direction: column;
}
.ds-stat-label {
    color: var(--ds-text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.ds-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--ds-text-main);
    line-height: 1;
}
.ds-stat-variation { font-size: 13px; font-weight: 600; }
.ds-stat-variation.up      { color: var(--ds-success); }
.ds-stat-variation.down    { color: var(--ds-danger); }
.ds-stat-variation.neutral { color: var(--ds-text-light); }

/* Hub Card — área do membro */
.ds-hub-card {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-lg);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--ds-shadow-md);
    transition: transform var(--ds-transition), box-shadow var(--ds-transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.ds-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.20);
    color: inherit;
}
.ds-hub-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
}

/* Card-page — container principal área do membro */
.ds-card-page {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-lg);
    padding: 24px;
    box-shadow: var(--ds-shadow-lg);
}
@media (min-width: 768px) {
    .ds-card-page { padding: 32px; border-radius: var(--ds-radius-xl); }
}
.ds-card-page-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ds-text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cards landing page */
.ds-how-card {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-md);
    padding: 24px;
    text-align: center;
    box-shadow: var(--ds-shadow-sm);
}
.ds-parceiro-card {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-md);
    overflow: hidden;
    box-shadow: var(--ds-shadow-sm);
    transition: transform var(--ds-transition), box-shadow var(--ds-transition);
}
.ds-parceiro-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Section shell — bloco de seção no dashboard */
.ds-section-shell {
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    padding: 24px;
    margin-bottom: 20px;
}


/* ============================================================
   7. FORMULÁRIOS
   ============================================================ */

.ds-form-group  { margin-bottom: 18px; }

.ds-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-muted);
    margin-bottom: 6px;
}

.ds-form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    font-size: 14px;
    font-family: var(--ds-font-body);
    color: var(--ds-text-main);
    background: var(--ds-bg-card);
    transition: border-color var(--ds-transition-fast), box-shadow var(--ds-transition-fast);
    line-height: 1.5;
}
.ds-form-control:focus {
    outline: none;
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 3px rgba(var(--ds-primary-rgb), 0.12);
}
.ds-form-control::placeholder { color: var(--ds-text-light); }
.ds-form-control:disabled {
    background: var(--ds-bg-subtle);
    color: var(--ds-text-muted);
    cursor: not-allowed;
}

.ds-form-control-lg {
    padding: 12px 16px;
    border-radius: var(--ds-radius-md);
    font-size: 15px;
}

.ds-form-hint {
    font-size: 12px;
    color: var(--ds-text-light);
    margin-top: 4px;
}

.ds-form-error {
    font-size: 12px;
    color: var(--ds-danger);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ds-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.ds-search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.ds-search-box i {
    position: absolute;
    left: 10px;
    color: var(--ds-text-light);
    font-size: 13px;
    pointer-events: none;
}
.ds-search-box .ds-form-control {
    padding-left: 32px;
}


/* ============================================================
   8. TABELAS
   ============================================================ */

.ds-table-container {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-border);
    padding: 24px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.ds-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ds-table-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ds-text-main);
}

.ds-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.ds-table th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ds-border);
    color: var(--ds-text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--ds-bg-card);
}

.ds-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ds-border-light);
    font-size: 14px;
    color: var(--ds-text-body);
    white-space: normal;
}

.ds-table tbody tr:last-child td { border-bottom: none; }
.ds-table tbody tr:hover td      { background-color: var(--ds-border-light); }

/* Coluna de ações — botões alinhados à direita */
.ds-table td.ds-table-actions {
    text-align: right;
    white-space: nowrap;
    padding-right: 8px;
}


/* ============================================================
   9. BADGES
   ============================================================ */

.ds-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.ds-badge-sm {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
}

.ds-badge-lg {
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.ds-badge-success { background: var(--ds-success-light); color: var(--ds-success-dark); }
.ds-badge-warning { background: var(--ds-warning-light); color: var(--ds-warning-dark); }
.ds-badge-danger  { background: var(--ds-danger-light);  color: var(--ds-danger-dark);  }
.ds-badge-info    { background: var(--ds-info-light);    color: var(--ds-info-dark);    }
.ds-badge-primary { background: var(--ds-primary-light); color: var(--ds-primary);      }
.ds-badge-neutral { background: var(--ds-bg-subtle);     color: var(--ds-text-muted);   }


/* ============================================================
   10. ALERTAS / MENSAGENS
   ============================================================ */

.ds-alert {
    padding: 12px 16px;
    border-radius: var(--ds-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.ds-alert i { flex-shrink: 0; margin-top: 1px; }

.ds-alert-success { background: var(--ds-success-light); color: var(--ds-success-dark); border: 1px solid #a7f3d0; }
.ds-alert-danger  { background: var(--ds-danger-light);  color: var(--ds-danger-dark);  border: 1px solid #fecaca; }
.ds-alert-warning { background: var(--ds-warning-light); color: var(--ds-warning-dark); border: 1px solid #fde68a; }
.ds-alert-info    { background: var(--ds-info-light);    color: var(--ds-info-dark);    border: 1px solid #bfdbfe; }


/* ============================================================
   11. MODAIS
   ============================================================ */

.ds-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ds-modal-overlay.active { display: flex; }

.ds-modal-overlay-blur {
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(8px);
}

.ds-modal-content {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-md);
    max-width: 540px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: var(--ds-shadow-xl);
    animation: ds-modal-in 0.2s ease;
}

.ds-modal-content-sm { max-width: 400px; }
.ds-modal-content-lg { max-width: 720px; }

.ds-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--ds-text-light);
    transition: color var(--ds-transition-fast);
    padding: 4px;
    border-radius: var(--ds-radius-sm);
}
.ds-modal-close:hover { color: var(--ds-text-body); background: var(--ds-bg-subtle); }

.ds-modal-header {
    margin-bottom: 24px;
}

.ds-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ds-text-main);
}

.ds-modal-footer {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Modal versão área do membro */
.ds-modal-box {
    background: var(--ds-bg-card);
    border-radius: var(--ds-radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--ds-shadow-xl);
}


/* ============================================================
   12. USER MENU (dropdown topbar)
   ============================================================ */

.ds-user-menu { position: relative; }

.ds-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid var(--ds-border);
    background: var(--ds-bg-card);
    color: var(--ds-text-body);
    font-family: var(--ds-font-body);
    font-size: 13px;
    font-weight: 500;
    transition: border-color var(--ds-transition-fast), background var(--ds-transition-fast);
}
.ds-user-trigger:hover {
    border-color: #ccc;
    background: var(--ds-bg-subtle);
}

.ds-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ds-primary-blue);
    color: var(--ds-text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.ds-user-avatar-lg {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

.ds-user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ds-user-chevron {
    font-size: 10px;
    color: var(--ds-text-muted);
    transition: transform var(--ds-transition-fast);
}

.ds-user-menu.open .ds-user-chevron { transform: rotate(180deg); }

.ds-user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: auto;
    min-width: 200px;
    max-width: min(90vw, 320px);
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-md);
    box-shadow: var(--ds-shadow-nav);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--ds-transition);
    z-index: 200;
    overflow: hidden;
}

.ds-user-menu.open .ds-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ds-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ds-dropdown-info {
    min-width: 0;
    flex: 1;
}

.ds-dropdown-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-text-main);
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ds-dropdown-info p {
    font-size: 12px;
    color: var(--ds-text-muted);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ds-dropdown-body { padding: 5px; }

.ds-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--ds-radius-sm);
    text-decoration: none;
    color: var(--ds-text-body);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--ds-transition-fast);
}
.ds-dropdown-item:hover { background: var(--ds-bg-subtle); color: var(--ds-text-main); }
.ds-dropdown-item i { width: 16px; text-align: center; color: var(--ds-text-light); font-size: 13px; }

.ds-dropdown-divider { height: 1px; background: var(--ds-border); margin: 4px 12px; }

.ds-dropdown-item-danger          { color: var(--ds-danger); }
.ds-dropdown-item-danger:hover    { background: var(--ds-danger-light); color: var(--ds-danger-dark); }
.ds-dropdown-item-danger i        { color: var(--ds-danger); }


/* ============================================================
   13. PAGINAÇÃO
   ============================================================ */

.ds-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.ds-page-btn {
    padding: 7px 13px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-muted);
    background: var(--ds-bg-card);
    cursor: pointer;
    transition: all var(--ds-transition-fast);
    text-decoration: none;
    line-height: 1.3;
}
.ds-page-btn:hover       { background: var(--ds-bg-subtle); color: var(--ds-text-body); }
.ds-page-btn.active      { background: var(--ds-primary); color: #fff; border-color: var(--ds-primary); }
.ds-page-btn:disabled    { opacity: 0.4; cursor: not-allowed; }

.ds-page-info {
    font-size: 13px;
    color: var(--ds-text-muted);
    padding: 0 4px;
}


/* ============================================================
   14. STEPPER (formulário multi-passo)
   ============================================================ */

.ds-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}
.ds-stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ds-border);
    z-index: 1;
}
.ds-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ds-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ds-border);
    color: var(--ds-text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}
.ds-step.active .ds-step-circle {
    background: var(--ds-primary-blue);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,34,250,0.3);
}
.ds-step.done .ds-step-circle {
    background: var(--ds-success);
    color: #fff;
}
.ds-step-label {
    font-size: 12px;
    color: var(--ds-text-muted);
    font-weight: 500;
}
.ds-step.active .ds-step-label { color: var(--ds-primary-blue); font-weight: 600; }
.ds-step.done  .ds-step-label  { color: var(--ds-success); }


/* ============================================================
   15. UPLOAD AREA
   ============================================================ */

.ds-upload-area {
    border: 2px dashed var(--ds-border);
    border-radius: var(--ds-radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    gap: 10px;
    cursor: pointer;
    transition: border-color var(--ds-transition), background var(--ds-transition);
    text-align: center;
}
.ds-upload-area:hover  { border-color: var(--ds-primary); background: var(--ds-primary-light); }
.ds-upload-area.active { border-color: var(--ds-success); background: var(--ds-success-light); }


/* ============================================================
   16. EMPTY STATE
   ============================================================ */

.ds-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
}

.ds-empty-icon {
    font-size: 40px;
    color: var(--ds-border);
    line-height: 1;
}

.ds-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ds-text-muted);
}

.ds-empty-desc {
    font-size: 14px;
    color: var(--ds-text-light);
    max-width: 320px;
    line-height: 1.6;
}


/* ============================================================
   17. GRIDS
   ============================================================ */

/* Grid de stats KPI (4 colunas → 2 → 1) */
.ds-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

/* Grid da área do membro */
.ds-hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (min-width: 768px) {
    .ds-hub-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* Grid dashboard */
.ds-dashboard-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.ds-grid-2         { grid-template-columns: 1fr 1fr; }
.ds-grid-3         { grid-template-columns: 1fr 1fr 1fr; }
.ds-grid-auto      { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Grids landing */
.ds-how-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.ds-cards-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.ds-premios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }


/* ============================================================
   18. UTILITÁRIOS
   ============================================================ */

/* Texto */
.ds-text-primary  { color: var(--ds-primary) !important; }
.ds-text-muted    { color: var(--ds-text-muted) !important; }
.ds-text-light    { color: var(--ds-text-light) !important; }
.ds-text-success  { color: var(--ds-success) !important; }
.ds-text-danger   { color: var(--ds-danger) !important; }
.ds-text-warning  { color: var(--ds-warning) !important; }
.ds-text-center   { text-align: center !important; }
.ds-text-right    { text-align: right !important; }

/* Fonte */
.ds-font-bold     { font-weight: 700 !important; }
.ds-font-semibold { font-weight: 600 !important; }
.ds-font-mono     { font-family: var(--ds-font-mono) !important; }
.ds-text-sm       { font-size: 13px !important; }
.ds-text-xs       { font-size: 11px !important; }

/* Espaçamento */
.ds-mt-0  { margin-top: 0 !important; }
.ds-mb-0  { margin-bottom: 0 !important; }
.ds-mb-8  { margin-bottom: 8px !important; }
.ds-mb-12 { margin-bottom: 12px !important; }
.ds-mb-16 { margin-bottom: 16px !important; }
.ds-mb-20 { margin-bottom: 20px !important; }
.ds-mb-24 { margin-bottom: 24px !important; }
.ds-mt-16 { margin-top: 16px !important; }
.ds-mt-20 { margin-top: 20px !important; }
.ds-mt-24 { margin-top: 24px !important; }
.ds-mt-32 { margin-top: 32px !important; }

/* Flex */
.ds-flex            { display: flex !important; }
.ds-inline-flex     { display: inline-flex !important; }
.ds-items-center    { align-items: center !important; }
.ds-items-start     { align-items: flex-start !important; }
.ds-justify-between { justify-content: space-between !important; }
.ds-justify-center  { justify-content: center !important; }
.ds-justify-end     { justify-content: flex-end !important; }
.ds-flex-wrap       { flex-wrap: wrap !important; }
.ds-flex-col        { flex-direction: column !important; }
.ds-flex-1          { flex: 1 !important; }
.ds-gap-4  { gap: 4px !important; }
.ds-gap-6  { gap: 6px !important; }
.ds-gap-8  { gap: 8px !important; }
.ds-gap-10 { gap: 10px !important; }
.ds-gap-12 { gap: 12px !important; }
.ds-gap-16 { gap: 16px !important; }
.ds-gap-20 { gap: 20px !important; }
.ds-gap-24 { gap: 24px !important; }

/* Width */
.ds-w-full { width: 100% !important; }

/* Overflow */
.ds-overflow-x-auto { overflow-x: auto !important; }
.ds-overflow-hidden { overflow: hidden !important; }

/* Visibility */
.ds-hidden { display: none !important; }

/* Separador horizontal */
.ds-divider {
    height: 1px;
    background: var(--ds-border);
    margin: 20px 0;
}


/* ============================================================
   19. ANIMAÇÕES
   ============================================================ */

@keyframes ds-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ds-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ds-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes ds-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
@keyframes ds-modal-in {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ds-animate-fade-in { animation: ds-fadeIn 0.25s ease forwards; }
.ds-animate-slide-up { animation: ds-slideUp 0.3s ease forwards; }
.ds-animate-spin { animation: ds-spin 1s linear infinite; }
.ds-animate-pulse { animation: ds-pulse 1.5s ease-in-out infinite; }


/* ============================================================
   14. ISOMETRIC BOXES BACKGROUND (CANVAS)
   ============================================================ */

.ds-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   15. RESPONSIVO
   ============================================================ */

/* Animação das ondas se expandindo e sumindo */
@keyframes ds-signal-wave {
    0% {
        transform: scale(0.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

.ds-mesh-bg {
    position: relative;
    background-color: var(--ds-bg-page);
    overflow: hidden;
}

/* O emissor do sinal (posicionado no centro-fundo) */
.ds-mesh-bg-blobs {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 0;
    pointer-events: none;
}

/* Os anéis da onda */
.ds-mesh-blob-2,
.ds-mesh-blob-3,
.ds-mesh-blob-4 {
    position: absolute;
    top: -200px;
    left: -200px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    /* Usando box-shadow para criar um "fio" luminoso difuso, em vez de linha dura */
    box-shadow: inset 0 0 20px rgba(0, 100, 255, 0.4),
                0 0 15px rgba(0, 11, 74, 0.1);
    opacity: 0;
    transform-origin: center center;
}

/* Onda 1 (Azul Vibrante) */
.ds-mesh-blob-2 {
    animation: ds-signal-wave 12s infinite cubic-bezier(0.1, 0.5, 0.8, 1);
}

/* Onda 2 (Atrasada) */
.ds-mesh-blob-3 {
    animation: ds-signal-wave 12s infinite cubic-bezier(0.1, 0.5, 0.8, 1);
    animation-delay: 4s;
    box-shadow: inset 0 0 20px rgba(0, 100, 255, 0.3),
                0 0 10px rgba(255, 107, 0, 0.15); /* Toque laranja */
}

/* Onda 3 (Atrasada) */
.ds-mesh-blob-4 {
    animation: ds-signal-wave 12s infinite cubic-bezier(0.1, 0.5, 0.8, 1);
    animation-delay: 8s;
}

/* Proteção para os elementos do sistema não sumirem atrás do z-index: 0 */
.ds-shell-container {
    position: relative;
    z-index: 10;
}

@keyframes ds-mesh-blob2 {
    0%   { transform: translate(0px, 0px) scale(1); }
    33%  { transform: translate(-5vw, -6vh) scale(1.15); }
    66%  { transform: translate(4vw, -4vh) scale(0.85); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes ds-mesh-blob3 {
    0%   { transform: translate(0px, 0px) scale(1); }
    50%  { transform: translate(4vw, -2vh) scale(1.2); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.ds-mesh-bg {
    position: relative;
    background-color: var(--ds-bg-page);
    overflow: hidden;
}



/* Bolha 1: Azul principal (Canto superior esquerdo) */
.ds-mesh-bg::before {
    display: none; /* Removendo do fluxo visual, mantendo por compatibilidade retroativa */
}

/* Container extra para mais bolhas (injetado via classe no body) */
.ds-mesh-bg-blobs {
    display: none; /* Removendo do fluxo visual, mantendo por compatibilidade retroativa */
}

.ds-mesh-blob-2 {
    position: absolute;
    bottom: -30vh;
    right: -10vw;
    width: 70vw;
    height: 70vw;
    /* Azul claro / ciano sutil */
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 65%);
    border-radius: 50%;
    animation: ds-mesh-blob2 25s infinite ease-in-out;
}

.ds-mesh-blob-3 {
    position: absolute;
    top: 20vh;
    right: 15vw;
    width: 40vw;
    height: 40vw;
    /* Laranja Megalink super translúcido */
    background: radial-gradient(circle, rgba(255, 107, 0, 0.06) 0%, transparent 65%);
    border-radius: 50%;
    animation: ds-mesh-blob3 18s infinite ease-in-out alternate;
}

/* Proteção para os elementos do sistema não sumirem atrás do z-index: 0 */
.ds-shell-container {
    position: relative;
    z-index: 10;
}

/* ============================================================
   15. RESPONSIVO
   ============================================================ */

@media (max-width: 480px) {
    .ds-stats-grid { grid-template-columns: 1fr; }
    .ds-grid-2, .ds-grid-3 { grid-template-columns: 1fr; }
    .ds-main-content { padding: 16px; }
}

@media (max-width: 768px) {
    .ds-sidebar:not(.ds-shell-sidebar) {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--ds-border);
        padding: 4px;
    }
    .ds-sidebar:not(.ds-shell-sidebar) .ds-nav-item {
        border-left: none;
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: var(--ds-radius-sm);
    }
    .ds-sidebar:not(.ds-shell-sidebar) .ds-nav-item.active {
        border-left: none;
        border-bottom: 2px solid var(--ds-primary);
        border-radius: 0;
    }
    .ds-sidebar:not(.ds-shell-sidebar) .ds-sidebar-section-label { display: none; }
    .ds-main-content { padding: 20px 16px; }
    .ds-stats-grid { grid-template-columns: 1fr 1fr; }
    .ds-grid-2, .ds-grid-3 { grid-template-columns: 1fr; }
    .ds-premios-grid { grid-template-columns: repeat(2, 1fr); }
    .ds-shell-container { min-height: 100vh; }
    .ds-topbar { padding: 0 16px; }
    .ds-topbar-brand-logo {
        width: 144px;
        height: 80px;
    }
    .ds-topbar-brand-logo img {
        width: 100%;
        height: 100%;
        margin: 0;
    }
    .ds-shell-menu-btn { display: inline-flex; }
    .ds-shell-has-sidebar .ds-layout-body {
        position: relative;
    }
    .ds-shell-has-sidebar .ds-shell-sidebar {
        position: fixed;
        top: var(--ds-topbar-height);
        left: 0;
        bottom: 0;
        width: min(280px, 86vw);
        transform: translateX(-100%);
        transition: transform var(--ds-transition);
        z-index: 120;
        box-shadow: var(--ds-shadow-nav);
        padding: 12px 8px;
    }
    .ds-shell-has-sidebar.ds-shell-sidebar-open .ds-shell-sidebar {
        transform: translateX(0);
    }
    .ds-shell-has-sidebar .ds-shell-sidebar-overlay {
        display: block;
    }
    .ds-shell-has-sidebar.ds-shell-sidebar-open .ds-shell-sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
    .ds-modal-content { padding: 24px 20px; }
}

@media (max-width: 900px) {
    .ds-grid-3 { grid-template-columns: 1fr 1fr; }
}
