/* Identidade visual exclusiva do painel Naviê Jiu-Jitsu.
   Mantém a estrutura e a lógica existentes, unificando tipografia, superfícies,
   campos e componentes com a linguagem da página pública do evento. */
@font-face {
    font-family: 'NavieJiuManrope';
    src: url('../fonts/evento/manrope-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}
@font-face {
    font-family: 'NavieJiuDisplay';
    src: url('../fonts/evento/montserrat-arabic-bold.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'NavieJiuDisplay';
    src: url('../fonts/evento/montserrat-arabic-extrabold.woff2') format('woff2');
    font-style: normal;
    font-weight: 800 950;
    font-display: swap;
}

:root {
    --jj-admin-radius-xs: 5px;
    --jj-admin-radius-sm: 7px;
    --jj-admin-radius-md: 10px;
    --jj-admin-radius-lg: 12px;
    --jj-admin-border: #e3e7eb;
    --jj-admin-surface: #ffffff;
    --jj-admin-soft: #f5f7f6;
    --jj-admin-ink: #18231d;
    --jj-admin-muted: #69756f;
    --jj-admin-green: #07510e;
    --jj-admin-shadow: 0 8px 24px rgba(17, 35, 24, .055);
}

body.jj-admin-shell,
body.jj-admin-shell input,
body.jj-admin-shell textarea,
body.jj-admin-shell select,
body.jj-admin-shell button {
    font-family: 'NavieJiuManrope', Arial, sans-serif !important;
}

body.jj-admin-shell {
    color: var(--jj-admin-ink);
    letter-spacing: -.01em;
}

body.jj-admin-shell h1,
body.jj-admin-shell h2,
body.jj-admin-shell h3,
body.jj-admin-shell h4,
body.jj-admin-shell .font-black,
body.jj-admin-shell .font-extrabold,
body.jj-admin-shell [class*="font-[900"],
body.jj-admin-shell [class*="font-[950"] {
    font-family: 'NavieJiuDisplay', 'NavieJiuManrope', Arial, sans-serif !important;
    letter-spacing: -.025em;
}

body.jj-admin-shell .uppercase,
body.jj-admin-shell [class*="tracking-wid"] {
    letter-spacing: .055em !important;
}

/* Raios mais firmes, sem alterar avatares, indicadores e chaves circulares. */
body.jj-admin-shell [class~="rounded-3xl"],
body.jj-admin-shell [class*="rounded-[2rem]"],
body.jj-admin-shell [class*="rounded-[2.5rem]"] { border-radius: var(--jj-admin-radius-lg) !important; }
body.jj-admin-shell [class~="rounded-2xl"] { border-radius: var(--jj-admin-radius-md) !important; }
body.jj-admin-shell [class~="rounded-xl"],
body.jj-admin-shell [class~="rounded-lg"] { border-radius: var(--jj-admin-radius-sm) !important; }
body.jj-admin-shell [class~="rounded-md"] { border-radius: var(--jj-admin-radius-xs) !important; }

/* Estrutura central. */
body.jj-admin-shell > aside:first-of-type,
body.jj-admin-shell > aside:nth-of-type(2),
body.jj-admin-shell #painel-main-wrapper > header {
    border-color: color-mix(in srgb, var(--jj-admin-border) 88%, transparent) !important;
}

body.jj-admin-shell > aside:first-of-type {
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 4px 0 20px rgba(14, 36, 22, .045) !important;
}

html.dark body.jj-admin-shell > aside:first-of-type,
html.dark body.jj-admin-shell > aside:nth-of-type(2) {
    background: #030c06 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.jj-admin-shell > aside:first-of-type > div:first-child {
    height: 72px !important;
}

body.jj-admin-shell > aside:first-of-type nav a,
body.jj-admin-shell > aside:nth-of-type(2) nav a {
    border-radius: var(--jj-admin-radius-sm) !important;
}

body.jj-admin-shell #painel-main-wrapper > header {
    height: 64px !important;
    background: rgba(255, 255, 255, .91) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .035) !important;
}

html.dark body.jj-admin-shell #painel-main-wrapper > header {
    background: #040e07 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.jj-admin-shell #painel-main-wrapper > header [class~="rounded-full"]:not(.w-px) {
    border-radius: var(--jj-admin-radius-sm) !important;
}

body.jj-admin-shell #painel-main-wrapper > .overflow-y-auto {
    background: linear-gradient(180deg, rgba(247, 249, 248, .78), rgba(242, 246, 243, .48)) !important;
}

html.dark body.jj-admin-shell #painel-main-wrapper > .overflow-y-auto {
    background: rgba(1, 7, 3, .18) !important;
}

/* Cards, painéis e estados vazios. */
body.jj-admin-shell .premium-card,
body.jj-admin-shell main section[class*="border"],
body.jj-admin-shell main article[class*="border"] {
    border-color: var(--jj-admin-border) !important;
    box-shadow: var(--jj-admin-shadow) !important;
}

html.dark body.jj-admin-shell .premium-card,
html.dark body.jj-admin-shell main section[class*="border"],
html.dark body.jj-admin-shell main article[class*="border"] {
    border-color: rgba(35, 83, 47, .46) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.jj-admin-shell main [class*="border-dashed"] {
    box-shadow: none !important;
}

/* Campos nativos e editores. */
body.jj-admin-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body.jj-admin-shell textarea,
body.jj-admin-shell select,
body.jj-admin-shell .input-glass,
body.jj-admin-shell .ql-toolbar,
body.jj-admin-shell .ql-container {
    border-radius: var(--jj-admin-radius-sm) !important;
}

body.jj-admin-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body.jj-admin-shell textarea,
body.jj-admin-shell select,
body.jj-admin-shell .input-glass {
    border-color: #dce2df !important;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .025) !important;
}

body.jj-admin-shell input:not([type="hidden"]):focus,
body.jj-admin-shell textarea:focus,
body.jj-admin-shell select:focus,
body.jj-admin-shell .input-glass:focus {
    border-color: color-mix(in srgb, var(--jj-admin-green) 70%, #cbd5e1) !important;
    box-shadow: 0 0 0 3px rgba(7, 81, 14, .11) !important;
    transform: none !important;
}

html.dark body.jj-admin-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html.dark body.jj-admin-shell textarea,
html.dark body.jj-admin-shell select,
html.dark body.jj-admin-shell .input-glass {
    border-color: rgba(34, 78, 45, .62) !important;
    background-color: rgba(4, 17, 8, .9) !important;
    box-shadow: none !important;
}

/* No Glass, os divisores claros viravam linhas brancas muito evidentes. */
html.dark body.jj-admin-shell [class*="border-white"],
html.dark body.jj-admin-shell [class*="border-navie-border"] {
    border-color: rgba(30, 71, 41, .5) !important;
}

html.dark body.jj-admin-shell > aside:first-of-type > div:first-child,
html.dark body.jj-admin-shell > aside:first-of-type > div:last-child,
html.dark body.jj-admin-shell > aside:nth-of-type(2),
html.dark body.jj-admin-shell #painel-main-wrapper > header {
    border-color: transparent !important;
}

/* Superfícies opacas preservam profundidade sem recalcular blur a cada rolagem. */
html.dark body.jj-admin-shell .backdrop-blur-xl,
html.dark body.jj-admin-shell .backdrop-blur-lg,
html.dark body.jj-admin-shell .backdrop-blur-md,
html.dark body.jj-admin-shell .backdrop-blur-sm,
html.dark body.jj-admin-shell .backdrop-blur,
html.dark body.jj-admin-shell .select-dropdown-glass,
html.dark body.jj-admin-shell [class*="select-dropdown-container"] {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html.dark body.jj-admin-shell .select-dropdown-glass,
html.dark body.jj-admin-shell [class*="select-dropdown-container"] {
    background: #06120a !important;
    border-color: rgba(35, 83, 47, .56) !important;
}

body.jj-admin-shell input[type="checkbox"],
body.jj-admin-shell input[type="radio"] {
    accent-color: var(--jj-admin-green);
}

body.jj-admin-shell input[type="file"]::file-selector-button {
    border: 0;
    border-radius: var(--jj-admin-radius-xs) !important;
    padding: 8px 11px;
    color: #fff;
    background: var(--jj-admin-green);
    font: 800 11px/1 'NavieJiuManrope', Arial, sans-serif;
}

body.jj-admin-shell label {
    letter-spacing: .015em;
}

/* Selects pesquisáveis e menus de contexto. */
body.jj-admin-shell .select-dropdown-glass,
body.jj-admin-shell .select-dropdown-light,
body.jj-admin-shell [class*="select-dropdown-container"] {
    border-radius: var(--jj-admin-radius-md) !important;
    padding: 6px !important;
    box-shadow: 0 18px 44px rgba(10, 24, 15, .16) !important;
}

body.jj-admin-shell .select-dropdown-glass button,
body.jj-admin-shell .select-dropdown-light button,
body.jj-admin-shell [class*="select-dropdown-container"] button {
    min-height: 36px;
    border-radius: var(--jj-admin-radius-xs) !important;
}

/* Tabelas e listagens densas. */
body.jj-admin-shell table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
}

body.jj-admin-shell thead th {
    color: #6b756f !important;
    background: #f4f7f5;
    font: 800 10px/1.2 'NavieJiuManrope', Arial, sans-serif !important;
    letter-spacing: .055em !important;
    text-transform: uppercase;
}

html.dark body.jj-admin-shell thead th {
    color: #9caaa1 !important;
    background: rgba(255, 255, 255, .035);
}

body.jj-admin-shell tbody tr {
    transition: background-color .16s ease;
}

body.jj-admin-shell tbody tr:hover {
    background: rgba(7, 81, 14, .035);
}

/* Abas, botões e modais. */
body.jj-admin-shell nav[aria-label] button,
body.jj-admin-shell [role="tab"],
body.jj-admin-shell button,
body.jj-admin-shell a[class*="bg-brand"] {
    border-radius: var(--jj-admin-radius-sm) !important;
}

body.jj-admin-shell [role="dialog"] > div,
body.jj-admin-shell [role="alertdialog"],
body.jj-admin-shell #painel-modal-container > div > div,
body.jj-admin-shell [id$="-modal"] > div,
body.jj-admin-shell [id*="modal-"] > div {
    border-radius: var(--jj-admin-radius-lg) !important;
}

body.jj-admin-shell [role="dialog"] input,
body.jj-admin-shell [role="dialog"] textarea,
body.jj-admin-shell [role="dialog"] select {
    border-radius: var(--jj-admin-radius-sm) !important;
}

body.jj-admin-shell .company-settings {
    width: 100%;
    max-width: 1080px;
    min-width: 0;
    margin: 0 auto;
    padding: 8px 0 86px;
}

body.jj-admin-shell .company-settings__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

body.jj-admin-shell .company-settings__eyebrow {
    color: var(--jj-admin-green);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

body.jj-admin-shell .company-settings h2 {
    margin-top: 5px;
    color: var(--jj-admin-ink);
    font: 900 clamp(25px, 4vw, 36px)/1 'NavieJiuDisplay', Arial, sans-serif !important;
    letter-spacing: -.035em;
}

body.jj-admin-shell .company-settings__heading p {
    max-width: 650px;
    margin-top: 9px;
    color: var(--jj-admin-muted);
    font-size: 13px;
    line-height: 1.55;
}

body.jj-admin-shell .company-settings__identity {
    display: grid;
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--jj-admin-border);
    border-radius: var(--jj-admin-radius-md);
    background: #fff;
    color: var(--jj-admin-green);
    font: 900 26px/1 'NavieJiuDisplay', Arial, sans-serif;
}

body.jj-admin-shell .company-settings__identity img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
body.jj-admin-shell .company-settings form { min-width: 0; }

body.jj-admin-shell .company-settings nav {
    display: flex;
    max-width: 100%;
    gap: 7px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 5px;
}

body.jj-admin-shell .company-settings nav button {
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--jj-admin-border);
    border-radius: var(--jj-admin-radius-sm) !important;
    white-space: nowrap;
    color: #5e6b64;
    background: rgba(255, 255, 255, .74);
    font-size: 12px;
    font-weight: 800;
}

body.jj-admin-shell .company-settings nav button[aria-selected="true"] {
    border-color: var(--jj-admin-green);
    color: #fff;
    background: var(--jj-admin-green);
}

body.jj-admin-shell .company-settings section {
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid var(--jj-admin-border);
    border-radius: var(--jj-admin-radius-lg) !important;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--jj-admin-shadow);
}

body.jj-admin-shell .company-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

body.jj-admin-shell .company-section-title > div { display: flex; align-items: center; gap: 9px; }
body.jj-admin-shell .company-section-title > div > span { padding: 5px 7px; border-radius: var(--jj-admin-radius-xs); color: var(--jj-admin-green); background: rgba(7, 81, 14, .08); font-size: 9px; font-weight: 900; }
body.jj-admin-shell .company-settings h3 { color: var(--jj-admin-ink); font: 800 19px/1.2 'NavieJiuDisplay', Arial, sans-serif !important; }
body.jj-admin-shell .company-section-title p { max-width: 390px; color: var(--jj-admin-muted); font-size: 11px; line-height: 1.5; text-align: right; }

body.jj-admin-shell .company-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; }
body.jj-admin-shell .company-grid label { display: block; min-width: 0; font-size: 11px; font-weight: 800; }
body.jj-admin-shell .company-field-label { display: block; color: #4c5a52; }
body.jj-admin-shell .company-grid input:not([type="checkbox"]),
body.jj-admin-shell .company-grid textarea { display: block; width: 100%; min-width: 0; margin-top: 7px; padding: 12px; border: 1px solid #dce2df; border-radius: var(--jj-admin-radius-sm) !important; color: #0f172a; background: #fff; font: inherit; }
body.jj-admin-shell .company-grid input[type="color"] { height: 48px; padding: 5px; }
body.jj-admin-shell .company-grid input[type="file"] { font-size: 10px; }
body.jj-admin-shell .company-grid small { display: block; margin-top: 5px; color: var(--jj-admin-muted); font-size: 10px; font-weight: 500; }
body.jj-admin-shell .company-grid a { overflow-wrap: anywhere; }
body.jj-admin-shell .company-file-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 4px; color: var(--jj-admin-muted); font-size: 10px; }
body.jj-admin-shell .company-file-current > a { color: var(--jj-admin-green); font-weight: 900; text-decoration: none; }
body.jj-admin-shell .company-file-current > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
body.jj-admin-shell .company-file-current input { margin: 0 !important; }

body.jj-admin-shell .company-media-field { padding: 12px; border: 1px solid var(--jj-admin-border); border-radius: var(--jj-admin-radius-sm); background: var(--jj-admin-soft); }
body.jj-admin-shell .company-media-preview { display: grid; width: 100%; height: 104px; place-items: center; overflow: hidden; margin-bottom: 12px; border-radius: var(--jj-admin-radius-xs); color: #8a978f; background: #e9eeeb; }
body.jj-admin-shell .company-media-preview--logo,
body.jj-admin-shell .company-media-preview--icon { width: 104px; }
body.jj-admin-shell .company-media-preview--icon { height: 70px; width: 70px; }
body.jj-admin-shell .company-media-preview img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
body.jj-admin-shell .company-media-preview--wide img { padding: 0; object-fit: cover; }
body.jj-admin-shell .company-media-preview svg { width: 24px; height: 24px; }

body.jj-admin-shell .company-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; }
body.jj-admin-shell .company-actions > span { color: var(--jj-admin-muted); font-size: 10px; }
body.jj-admin-shell .company-save { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 13px 20px; border-radius: var(--jj-admin-radius-sm) !important; color: #fff; background: var(--jj-admin-green); font-size: 12px; font-weight: 900; }
body.jj-admin-shell .company-save svg { width: 16px; height: 16px; }
body.jj-admin-shell .company-save:disabled { cursor: wait; opacity: .68; }
body.jj-admin-shell .errorlist { margin-top: 7px; color: #ef4444; }

html.dark body.jj-admin-shell .company-settings h2,
html.dark body.jj-admin-shell .company-settings h3 { color: #f4f8f5; }
html.dark body.jj-admin-shell .company-settings__heading p,
html.dark body.jj-admin-shell .company-section-title p,
html.dark body.jj-admin-shell .company-actions > span { color: #91a096; }
html.dark body.jj-admin-shell .company-settings__identity,
html.dark body.jj-admin-shell .company-settings section,
html.dark body.jj-admin-shell .company-settings nav button { border-color: rgba(34, 78, 45, .58); background: rgba(4, 16, 8, .96); }
html.dark body.jj-admin-shell .company-settings nav button[aria-selected="true"] { border-color: #177525; background: #07510e; }
html.dark body.jj-admin-shell .company-field-label { color: #b7c2ba; }
html.dark body.jj-admin-shell .company-media-field { border-color: rgba(34, 78, 45, .58); background: rgba(6, 23, 11, .9); }
html.dark body.jj-admin-shell .company-media-preview { color: #7f9184; background: #0c2412; }
html.dark body.jj-admin-shell .company-grid input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html.dark body.jj-admin-shell .company-grid textarea {
    border-color: rgba(34, 78, 45, .62) !important;
    background: rgba(4, 17, 8, .92) !important;
    box-shadow: none !important;
}

/* Avisos seguem a mesma geometria do sistema. */
body.jj-admin-shell .navie-message-dialog,
body.jj-admin-shell #panel-notice section {
    border-radius: var(--jj-admin-radius-lg) !important;
}
body.jj-admin-shell .navie-message-confirm,
body.jj-admin-shell #panel-notice button { border-radius: var(--jj-admin-radius-sm) !important; }

/* Login do produto. */
body.jj-admin-login,
body.jj-admin-login input,
body.jj-admin-login button {
    font-family: 'NavieJiuManrope', Arial, sans-serif !important;
}
body.jj-admin-login .visual-title,
body.jj-admin-login .form-heading h1 {
    font-family: 'NavieJiuDisplay', 'NavieJiuManrope', Arial, sans-serif !important;
    letter-spacing: -.045em !important;
}
body.jj-admin-login .field-input,
body.jj-admin-login .login-submit,
body.jj-admin-login .request-switch { border-radius: var(--jj-admin-radius-sm) !important; }

@media (max-width: 767px) {
    body.jj-admin-shell #painel-main-wrapper > header {
        height: 58px !important;
        padding-inline: 14px !important;
    }
    body.jj-admin-shell #painel-main-wrapper > .overflow-y-auto {
        padding: 12px 10px calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.jj-admin-shell > aside:nth-of-type(2) {
        height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 0 !important;
    }
    body.jj-admin-shell > aside:nth-of-type(2) nav {
        padding-block: 6px !important;
    }
    body.jj-admin-shell > aside:nth-of-type(2) nav a {
        min-width: 42px;
        min-height: 42px;
    }
    body.jj-admin-shell .premium-card,
    body.jj-admin-shell main section[class*="border"],
    body.jj-admin-shell main article[class*="border"] {
        border-radius: var(--jj-admin-radius-md) !important;
    }
    body.jj-admin-shell [role="dialog"] > div,
    body.jj-admin-shell #painel-modal-container > div > div {
        border-radius: var(--jj-admin-radius-lg) !important;
    }
    body.jj-admin-login .login-visual { min-height: 12.5rem; height: 12.5rem; }
    body.jj-admin-shell .company-settings { padding-top: 2px; }
    body.jj-admin-shell .company-settings__heading { align-items: flex-start; gap: 12px; }
    body.jj-admin-shell .company-settings__identity { width: 54px; height: 54px; flex-basis: 54px; }
    body.jj-admin-shell .company-settings__heading p { font-size: 11px; }
    body.jj-admin-shell .company-grid { grid-template-columns: 1fr; gap: 15px; }
    body.jj-admin-shell .company-section-title { display: block; }
    body.jj-admin-shell .company-section-title p { margin-top: 8px; text-align: left; }
    body.jj-admin-shell .company-actions { align-items: stretch; flex-direction: column; }
    body.jj-admin-shell .company-save { width: 100%; }
    body.jj-admin-shell .company-settings nav { display: grid; grid-template-columns: 1.05fr .8fr 1.25fr; gap: 5px; overflow: visible; }
    body.jj-admin-shell .company-settings nav button { min-width: 0; padding: 9px 5px; white-space: normal; font-size: 9px; line-height: 1.15; }
}

@media (prefers-reduced-motion: reduce) {
    body.jj-admin-shell *, body.jj-admin-login * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
