:root {
    --wine-950: #210910;
    --wine-900: #2b0d16;
    --wine-800: #3c101e;
    --wine-700: #541426;
    --wine-600: #741c35;
    --wine-500: #8f2947;
    --gold-600: #a98442;
    --gold-500: #c6a15b;
    --gold-300: #e2c88c;
    --cream-100: #f8f3ea;
    --cream-50: #fcfaf6;
    --white: #ffffff;
    --olive: #4d624c;
    --danger: #a4343f;
    --text-primary: #251a1c;
    --text-secondary: #716568;
    --line: #e7ddd1;
    --line-strong: #d9cbbb;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 14px rgba(60, 20, 30, .06);
    --shadow-card: 0 8px 30px rgba(60, 20, 30, .08);
    --shadow-raised: 0 16px 42px rgba(43, 13, 22, .13);
    --transition: 200ms ease;
    --wine: var(--wine-700);
    --wine-dark: var(--wine-900);
    --gold: var(--gold-500);
    --paper: var(--cream-50);
    --ink: var(--text-primary);
    --muted: var(--text-secondary);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--cream-50) 0%, #f7f0e7 58%, #fbf8f3 100%);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(84, 20, 38, .035) .7px, transparent .7px);
    background-size: 8px 8px;
    opacity: .48;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(198, 161, 91, .38);
    outline-offset: 2px;
}
h1, h2, h3, h4 {
    margin-top: 0;
    color: var(--wine-900);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    line-height: 1.08;
}

/* Application shell */
.app-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    z-index: 1040;
    height: 100vh;
    overflow-y: auto;
    color: #fff;
    background: linear-gradient(180deg, var(--wine-950) 0%, var(--wine-800) 58%, #260b14 100%);
    border-right: 1px solid rgba(226, 200, 140, .12);
    padding: 28px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 34px;
    box-shadow: 12px 0 34px rgba(43, 13, 22, .1);
}
.sidebar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
    opacity: .7;
}
.brand { color: #fff; display: flex; flex-direction: column; align-items: center; width: 100%; text-align: center; }
.brand:hover { color: #fff; }
.brand-logo { display: block; width: min(100%, 188px); height: 138px; object-fit: contain; object-position: center; }
.brand-copy { display: grid; gap: 2px; margin-top: 8px; }
.brand-copy strong { color: #fff; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; line-height: 1; }
.brand-copy small { color: rgba(255, 255, 255, .56); font-size: 10px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-section-label { margin: 0 12px 8px; color: rgba(226, 200, 140, .7); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.nav-section-secondary { margin-top: 22px; }
.sidebar nav a, .sidebar-logout {
    position: relative;
    width: 100%;
    min-height: 46px;
    color: rgba(255, 255, 255, .72);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: color var(--transition), background var(--transition), transform var(--transition);
}
.sidebar nav a::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--gold-500);
    opacity: 0;
    transform: scaleY(.4);
    transition: var(--transition);
}
.app-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sidebar nav a i, .sidebar nav a .nav-wine-icon, .sidebar-logout i { width: 20px; color: var(--gold-300); font-size: 17px; text-align: center; }
.nav-wine-icon { flex: 0 0 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a small { margin-left: auto; color: rgba(255, 255, 255, .38); font-size: 9px; }
.sidebar nav a:hover, .sidebar nav a.active, .sidebar-logout:hover { color: #fff; background: rgba(116, 28, 53, .58); transform: translateX(2px); }
.sidebar nav a.active { box-shadow: inset 0 0 0 1px rgba(226, 200, 140, .12); }
.sidebar nav a.active::before { opacity: 1; transform: scaleY(1); }
.sidebar nav a.is-disabled { cursor: default; opacity: .62; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-close, .mobile-header, .sidebar-overlay { display: none; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: var(--radius-sm); display: grid; place-items: center; background: transparent; }
.sidebar-close { display: none; }

.main { min-width: 0; width: 100%; max-width: 1640px; min-height: 100vh; padding: 30px clamp(22px, 3vw, 48px) 48px; display: flex; flex-direction: column; }
.topbar, .page-title, .panel-head, .confraria-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.topbar { min-height: 68px; margin-bottom: 28px; border-bottom: 1px solid rgba(84, 20, 38, .08); padding-bottom: 18px; }
.topbar h1, .page-title h2, .confraria-head h2 { margin: 2px 0 0; font-size: clamp(29px, 3vw, 38px); }
.eyebrow { color: var(--gold-600); font-size: 11px; text-transform: uppercase; font-weight: 700; }
.profile-trigger {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 6px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, .58);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.profile-trigger:hover { background: #fff; box-shadow: var(--shadow-sm); }
.profile-avatar, .evaluator-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-weight: 700; }
.profile-avatar { width: 36px; min-width: 36px; max-width: 36px; height: 36px; min-height: 36px; max-height: 36px; overflow: hidden; aspect-ratio: 1; color: #fff; background: var(--wine-700); }
.profile-avatar img { display: block; width: 36px; min-width: 36px; max-width: 36px; height: 36px; min-height: 36px; max-height: 36px; border-radius: inherit; object-fit: cover; object-position: center; }
.profile-copy { display: grid; min-width: 110px; text-align: left; line-height: 1.2; }
.profile-copy small { color: var(--text-secondary); font-size: 10px; }
.profile-copy strong { font-size: 13px; }
.profile-trigger > i { color: var(--gold-600); font-size: 12px; }
.profile-dropdown { padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); }
.profile-dropdown .dropdown-item { border-radius: 7px; display: flex; gap: 9px; align-items: center; }

/* Buttons and badges */
.btn {
    min-height: 42px;
    border-radius: 9px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 650;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.btn-wine { color: #fff; background: var(--wine-700); border-color: var(--wine-700); box-shadow: 0 5px 14px rgba(84, 20, 38, .15); }
.btn-wine:hover { color: #fff; background: var(--wine-800); border-color: var(--wine-800); box-shadow: 0 8px 20px rgba(84, 20, 38, .22); }
.btn-outline-wine, .btn-ghost { color: var(--wine-700); background: rgba(255, 255, 255, .54); border-color: var(--line-strong); }
.btn-outline-wine:hover, .btn-ghost:hover { color: var(--wine-800); background: #fff; border-color: var(--gold-500); }
.btn-gold { color: var(--wine-950); background: var(--gold-500); border-color: var(--gold-500); box-shadow: 0 6px 18px rgba(169, 132, 66, .2); }
.btn-gold:hover { color: var(--wine-950); background: var(--gold-300); border-color: var(--gold-300); box-shadow: 0 9px 22px rgba(169, 132, 66, .26); }
.btn-danger-soft, .btn-outline-danger { color: var(--danger); background: #fff7f7; border-color: #e8c7ca; }
.btn-danger-soft:hover, .btn-outline-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-link { color: var(--wine-600); }
.status, .tie, .badge-app {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #e6d3a8;
    border-radius: 999px;
    background: #fff8e9;
    color: #795d28;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.status-finalizada, .badge-success { color: #3d603e; background: #eff6ef; border-color: #c9ddc9; }
.status-degustacao, .badge-wine { color: #fff; background: var(--wine-600); border-color: var(--wine-600); }
.tie, .badge-warning { color: #835d17; background: #fff4d7; border-color: #ead08d; }
.portal-status-blocked { color: #8b3037; background: #fff0f1; border-color: #e8c3c7; }

/* Hero and dashboard */
.hero-band {
    min-height: 230px;
    color: #fff;
    padding: clamp(26px, 4vw, 44px);
    margin-bottom: 24px;
    background:
        linear-gradient(90deg, rgba(33, 9, 16, .96), rgba(84, 20, 38, .78)),
        url("https://images.unsplash.com/photo-1506377247377-2a5b3b417ebb?auto=format&fit=crop&w=1600&q=82") center 52%/cover;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(226, 200, 140, .28);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-raised);
}
.hero-band .eyebrow { color: var(--gold-300); }
.hero-band h2 { margin: 5px 0 8px; color: #fff; font-size: clamp(38px, 5vw, 56px); }
.hero-band p { max-width: 590px; margin: 0; color: rgba(255, 255, 255, .7); }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric, .panel, .wine-card, .number-card, .podium-card {
    background: rgba(255, 255, 255, .74);
    border: 1px solid rgba(217, 203, 187, .82);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}
.metric {
    position: relative;
    min-width: 0;
    min-height: 148px;
    padding: 18px;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.metric:hover, .wine-card:hover, .number-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-raised); border-color: rgba(198, 161, 91, .5); }
.metric-icon { width: 36px; height: 36px; margin-bottom: 18px; display: grid; place-items: center; color: var(--wine-700); background: #f5e9e8; border-radius: 10px; font-size: 17px; }
.metric span:not(.metric-icon) { display: block; min-height: 34px; color: var(--text-secondary); font-size: 12px; }
.metric strong { display: block; color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(25px, 2vw, 34px); line-height: 1; overflow-wrap: anywhere; }
.metric:nth-child(2n) .metric-icon { color: #735522; background: #fbf2df; }
.metric-champion { background: linear-gradient(145deg, #fffaf0, #f5e5bd); border-color: rgba(198, 161, 91, .55); }
.metric-champion::after { content: ""; position: absolute; width: 70px; height: 70px; right: -24px; top: -24px; border: 1px solid rgba(169, 132, 66, .24); border-radius: 50%; }
.metric-champion .metric-icon { color: #735522; background: rgba(255, 255, 255, .58); }
.dashboard-hero { min-height: 210px; }
.dashboard-hero-context { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.dashboard-hero-context > span:last-child { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.76); font-size: 12px; font-weight: 600; }
.dashboard-hero-context > span:last-child i { color: var(--gold-300); }
.dashboard-overview { margin-bottom: 24px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr); gap: 16px; }
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-kpi { min-height: 132px; padding: 18px; display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 14px; align-content: center; }
.dashboard-kpi .metric-icon { width: 42px; height: 42px; margin: 0; grid-row: 1 / span 3; border-radius: 8px; }
.dashboard-kpi > span:not(.metric-icon) { min-height: 0; font-size: 11px; font-weight: 700; }
.dashboard-kpi > strong { margin-top: 3px; font-size: 34px; font-variant-numeric: tabular-nums; }
.dashboard-kpi > small { margin-top: 5px; }
.dashboard-highlight-grid { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-highlight { min-height: 0; padding: 18px 20px; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 15px; align-items: center; }
.dashboard-highlight .metric-icon { width: 46px; height: 46px; margin: 0; border-radius: 50%; }
.dashboard-highlight > div { min-width: 0; }
.dashboard-highlight > div > span { min-height: 0; font-size: 11px; font-weight: 700; }
.dashboard-highlight strong { margin-top: 4px; font-size: 27px; }
.dashboard-highlight small { margin-top: 6px; overflow-wrap: anywhere; }
.dashboard-latest { background: #fffdf9; border-left: 3px solid var(--wine-500); }
.dashboard-recent { padding: 0; overflow: hidden; }
.dashboard-recent .panel-head { min-height: 96px; margin: 0; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.dashboard-recent .panel-head > div { display: grid; gap: 2px; }
.dashboard-recent .panel-head h3 { font-size: 27px; }
.dashboard-recent .panel-head p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.dashboard-recent .panel-head .btn { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.dashboard-table-wrap { border: 0; border-radius: 0; }
.dashboard-table thead th { padding-block: 12px; background: #f8f1e8; }
.dashboard-table tbody td { padding-block: 15px; }
.dashboard-event-name { color: var(--wine-800); font-weight: 750; }
.dashboard-latest-row td:first-child { box-shadow: inset 3px 0 var(--gold-500); }
.dashboard-table .table-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.dashboard-table .table-actions .btn-outline-danger { width: 36px; padding-inline: 0; }
.dashboard-table .table-actions .btn-outline-danger span { display: none; }

/* Surfaces and forms */
.panel { padding: clamp(19px, 2.4vw, 28px); margin-bottom: 24px; }
.panel.narrow { max-width: 980px; }
.panel-head { margin-bottom: 20px; }
.panel h3, .panel-head h3 { margin: 0; font-size: 24px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.wine-card { position: relative; padding: 22px; transition: var(--transition); }
.wine-card h3 { margin: 18px 0 8px; font-size: 25px; }
.wine-card p { margin: 0 0 7px; color: var(--text-secondary); }
.card-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 18px 0; color: var(--wine-700); font-size: 12px; font-weight: 700; }
.card-stats span { display: inline-flex; align-items: center; gap: 5px; }
.confraria-list-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.confraria-list-card { min-height: 342px; padding: 0; display: grid; grid-template-rows: auto auto 1fr auto auto; overflow: hidden; border-top: 3px solid var(--gold-500); background: rgba(255,255,255,.92); box-shadow: 0 10px 30px rgba(60,20,30,.07); }
.confraria-list-card.is-finalizada { border-top-color: #779175; }
.confraria-list-card.is-degustacao { border-top-color: var(--wine-500); }
.confraria-list-card.is-preparacao { border-top-color: var(--gold-500); }
.confraria-card-topline { min-height: 58px; padding: 16px 20px 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.confraria-card-topline time { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 11px; font-weight: 600; white-space: nowrap; }
.confraria-card-topline time i { color: var(--gold-600); }
.confraria-list-card h3 { margin: 10px 20px 15px; color: var(--wine-900); font-size: 29px; line-height: 1; }
.confraria-card-details { margin: 0 20px; display: grid; align-content: start; gap: 12px; }
.confraria-card-details p { min-width: 0; margin: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; }
.confraria-card-details > p > i { width: 32px; height: 32px; display: grid; place-items: center; color: var(--gold-600); background: #fff7e8; border: 1px solid #eadcc1; border-radius: 7px; }
.confraria-card-details p span { min-width: 0; display: grid; gap: 1px; }
.confraria-card-details small { color: var(--text-secondary); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.confraria-card-details strong { overflow-wrap: anywhere; color: var(--text-primary); font-size: 13px; font-weight: 600; }
.confraria-card-stats { margin: 18px 0 0; padding: 13px 20px; gap: 20px; background: #fbf7f1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.confraria-card-stats span { color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.confraria-card-stats span i { color: var(--gold-600); font-size: 14px; }
.confraria-card-stats span strong { margin-right: 1px; color: var(--wine-800); font-size: 14px; }
.confraria-card-actions { min-height: 106px; padding: 14px 20px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.confraria-card-actions .btn { width: 100%; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.confraria-card-actions form { min-width: 0; margin: 0; }
.confraria-card-actions form .btn { width: 100%; }
.confraria-card-actions form .btn span { display: inline; }
.form-page-intro { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.form-page-icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; color: var(--gold-600); background: #fff7e8; border: 1px solid #ead7aa; border-radius: var(--radius-md); font-size: 23px; }
.form-page-intro h3 { margin: 0 0 4px; }
.form-page-intro p { margin: 0; color: var(--text-secondary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.stack-form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; color: var(--wine-900); font-size: 13px; font-weight: 700; }
.form-control, .form-select {
    min-height: 46px;
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, .86);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    padding: 10px 13px;
    transition: var(--transition);
}
.form-control::placeholder { color: #a69a9b; }
.form-control:hover, .form-select:hover { border-color: #c8b49f; }
.form-control:focus, .form-select:focus { color: var(--text-primary); background: #fff; border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(198, 161, 91, .14); }
textarea.form-control { min-height: 112px; resize: vertical; }
.checkline { min-height: 46px; display: flex; grid-auto-flow: column; justify-content: start; align-items: center; gap: 9px; }
.checkline input { width: 17px; height: 17px; accent-color: var(--wine-700); }

/* Confraria navigation and overview */
.confraria-head {
    min-height: 186px;
    padding: clamp(24px, 4vw, 38px);
    color: #fff;
    background:
        linear-gradient(100deg, rgba(33, 9, 16, .97), rgba(84, 20, 38, .84)),
        url("https://images.unsplash.com/photo-1516594915697-87eb3b1c14ea?auto=format&fit=crop&w=1400&q=78") center/cover;
    border: 1px solid rgba(198, 161, 91, .3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-raised);
}
.confraria-head h2 { color: #fff; font-size: clamp(35px, 4vw, 48px); }
.confraria-head .eyebrow { color: var(--gold-300); }
.confraria-head p { max-width: 760px; margin: 10px 0 0; color: rgba(255, 255, 255, .72); }
.confraria-head p strong { color: #fff; }
.confraria-head .btn-outline-wine { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .32); }
.confraria-quick-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; padding: 20px 22px; background: rgba(255, 255, 255, .58); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.confraria-quick-info h2 { margin: 3px 0 7px; font-size: 29px; }
.confraria-quick-info p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.confraria-status-control { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.confraria-status-control form { margin: 0; }
.result-locked-state { display: flex; align-items: center; gap: 16px; min-height: 150px; }
.result-locked-state > i { display: grid; width: 52px; height: 52px; place-items: center; flex: 0 0 auto; color: var(--wine-700); background: #f4e8e7; border-radius: 50%; font-size: 23px; }
.result-locked-state h3 { margin: 0 0 5px; }
.result-locked-state p { margin: 0; color: var(--text-secondary); }
.tabbar { display: flex; gap: 6px; margin: 0 0 24px; padding: 6px; overflow-x: auto; scrollbar-width: thin; background: rgba(255, 255, 255, .58); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.tabbar a { min-height: 40px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); padding: 8px 13px; border-radius: 8px; font-size: 13px; font-weight: 650; transition: var(--transition); }
.tabbar a i { color: var(--gold-600); }
.tabbar a:hover { color: var(--wine-700); background: #fff; }
.tabbar a.active { color: #fff; background: var(--wine-700); box-shadow: 0 6px 16px rgba(84, 20, 38, .18); }
.tabbar a.active i { color: var(--gold-300); }
.progress { height: 10px; overflow: hidden; background: #eee3d7; border-radius: 999px; }
.progress-bar { background: linear-gradient(90deg, var(--wine-600), var(--gold-500)); border-radius: 999px; transition: width 600ms ease; }
.pending-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pending-list span { color: #795d28; background: #fff8e9; border: 1px solid #ead7aa; padding: 7px 10px; border-radius: 8px; font-size: 12px; }
.result-release-status { margin: 0 0 24px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #fffaf3; border: 1px solid var(--line); border-left: 3px solid var(--gold-500); border-radius: var(--radius-md); }
.result-release-status > div { display: grid; gap: 3px; }
.result-release-status strong { color: var(--wine-800); font-size: 15px; }
.result-release-status strong.is-public { color: #3d603e; }
.result-release-status p { margin: 0; color: var(--text-secondary); font-size: 13px; }

/* Tables */
.table-responsive { border: 1px solid var(--line); border-radius: var(--radius-md); scrollbar-color: var(--gold-300) #f4ece3; }
.elegant-table { width: 100%; margin: 0; vertical-align: middle; }
.elegant-table > :not(caption) > * > * { padding: 14px 13px; border-bottom-color: var(--line); }
.elegant-table thead th { color: var(--wine-800); background: #f6ede3; border-bottom: 1px solid var(--line-strong); font-size: 11px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.elegant-table tbody td, .elegant-table tbody th { background: rgba(255, 255, 255, .48); }
.elegant-table tbody tr { transition: background var(--transition); }
.elegant-table tbody tr:hover td, .elegant-table tbody tr:hover th { background: #fffaf3; }
.elegant-table tfoot th { color: var(--wine-800); background: #f4e7d8; }
.elegant-table .form-control { min-width: 150px; min-height: 40px; }
.table-actions { min-width: max-content; display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 8px; white-space: nowrap; }
.table-actions form { margin: 0; }
.order-controls { width: 32px; display: grid; gap: 3px; }
.order-form { margin: 0; }
.order-controls button {
    width: 30px;
    height: 27px;
    display: grid;
    place-items: center;
    color: var(--wine-700);
    background: #fffaf3;
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: var(--transition);
}
.order-controls button:hover:not(:disabled) { color: #fff; background: var(--wine-700); border-color: var(--wine-700); }
.order-controls button:disabled { cursor: not-allowed; opacity: .32; }
.order-controls i { font-size: 11px; }
.order-controls .drag-handle { color: var(--gold-500); cursor: grab; }
.order-controls .drag-handle:active { cursor: grabbing; }
.elegant-table tbody tr.confraria-order-dragging td { opacity: .48; background: #fff8ed; }
.elegant-table tbody tr.confraria-order-target td { box-shadow: inset 0 2px 0 var(--gold-500); }
@media (max-width: 767px) {
    .order-controls .drag-handle { display: none; }
}

/* Admin mobile: component hierarchy, touch targets and compact operational cards. */
.dashboard-mobile-events { display: none; }

@media (max-width: 767px) {
    body { overflow-x: hidden; background: #f8f3ec; }
    .mobile-header { height: 62px; padding: 8px 14px; border-bottom: 1px solid rgba(226, 200, 140, .18); box-shadow: 0 5px 18px rgba(33, 9, 16, .15); }
    .mobile-header .icon-button { width: 44px; height: 44px; flex: 0 0 44px; }
    .mobile-header img { width: 44px; height: 42px; }
    .mobile-header span { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
    .main { min-height: calc(100vh - 62px); padding: 18px 14px 34px; }

    .page-title, .panel-head { gap: 12px; }
    .page-title h2, .confraria-head h2 { font-size: 32px; }
    .page-title p, .section-description { font-size: 13px; }
    .page-title .actions, .page-title .actions > *, .page-title > .btn { width: 100%; }
    .page-title .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-title .actions > :only-child { grid-column: 1 / -1; }

    .panel { margin-bottom: 16px; padding: 16px; border-radius: 8px; box-shadow: 0 7px 22px rgba(60, 20, 30, .06); }
    .panel-head h3, .panel h3 { font-size: 23px; }
    .form-control, .form-select { min-height: 48px; font-size: 16px; }
    .form-grid, .stack-form { gap: 14px; }
    .form-page-intro { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
    .form-page-icon { width: 44px; height: 44px; flex-basis: 44px; font-size: 20px; }
    .form-page-intro h3 { font-size: 23px; }
    .form-actions, .actions { gap: 9px; }
    .form-actions .btn, .panel > .actions .btn { min-height: 46px; }
    .table-responsive { scrollbar-width: thin; }
    .modal-dialog { margin: 12px; }
    .premium-modal .modal-content { padding: 20px; }

    .evaluator-stats { gap: 9px; margin-bottom: 14px; }
    .evaluator-stats article { min-height: 88px; padding: 13px; border-radius: 8px; box-shadow: 0 5px 16px rgba(60, 20, 30, .05); }
    .evaluator-stats span { max-width: calc(100% - 28px); font-size: 9px; }
    .evaluator-stats strong { margin-top: 7px; font-size: 27px; }
    .evaluator-stats i { right: 12px; bottom: 12px; font-size: 21px; }
    .evaluator-directory { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .evaluator-toolbar { gap: 11px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf9; box-shadow: var(--shadow-sm); }
    .evaluator-toolbar label > span { margin-bottom: 5px; }
    .evaluator-global-list { gap: 12px; }
    .evaluator-global-card { gap: 0; overflow: hidden; padding: 0; border: 1px solid var(--line); border-top: 3px solid var(--gold-500); border-radius: 8px; background: #fffdf9; box-shadow: 0 8px 24px rgba(60, 20, 30, .07); }
    .evaluator-global-card:last-child { border-bottom: 1px solid var(--line); }
    .evaluator-global-identity { padding: 15px 14px 13px; }
    .evaluator-global-identity > span, .evaluator-global-identity > img { flex-basis: 48px; width: 48px; height: 48px; }
    .evaluator-global-identity h3 { font-size: 15px; }
    .evaluator-global-facts { gap: 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbf7f1; }
    .evaluator-global-facts div { min-height: 67px; padding: 11px 13px; }
    .evaluator-global-facts div:nth-child(odd) { border-right: 1px solid var(--line); }
    .evaluator-global-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .evaluator-global-facts small { margin-bottom: 4px; font-size: 9px; }
    .evaluator-global-facts strong { font-size: 11px; line-height: 1.35; }
    .evaluator-participation-summary { padding: 13px 14px; }
    .evaluator-participation-summary > i { font-size: 18px; }
    .evaluator-global-actions { gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #fffaf4; }
    .evaluator-global-actions .btn { min-height: 42px; padding: 7px 9px; white-space: normal; }
    .evaluator-global-actions form:last-child { grid-column: 1 / -1; }

    .catalog-heading { gap: 12px; }
    .catalog-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .catalog-metrics article { min-height: 88px; padding: 10px; align-items: flex-start; flex-direction: column; gap: 7px; }
    .catalog-metrics article > i, .catalog-metrics .catalog-wine-icon { width: 32px; height: 32px; flex-basis: 32px; padding: 7px; font-size: 16px; }
    .catalog-metrics strong { font-size: 18px; }
    .catalog-metrics span { margin-top: 3px; font-size: 10px; line-height: 1.25; }
    .catalog-filters { gap: 9px; margin-bottom: 14px; padding: 12px; }
    .catalog-card { display: grid; grid-template-columns: clamp(104px, 32vw, 132px) minmax(0, 1fr); grid-template-rows: auto auto; min-height: 190px; box-shadow: 0 8px 24px rgba(60, 20, 30, .07); }
    .catalog-card:hover { transform: none; }
    .catalog-card-image { grid-column: 1; grid-row: 1; width: 100%; height: 166px; aspect-ratio: auto; padding: 8px; border-right: 1px solid var(--line); border-bottom: 0; background: #f7f1e8; }
    .catalog-card-copy { grid-column: 2; grid-row: 1; min-height: 166px; padding: 14px 13px 12px; }
    .catalog-card h3 { margin-bottom: 10px; font-size: 21px; line-height: 1.05; }
    .catalog-card-facts { gap: 5px; margin-bottom: 11px; font-size: 11px; }
    .catalog-card-bottom { align-items: flex-end; gap: 7px; }
    .catalog-card-link { font-size: 0; }
    .catalog-card-link i { font-size: 14px; }
    .catalog-card footer { grid-column: 1 / -1; grid-row: 2; min-height: 40px; padding: 10px 13px; }

    .dashboard-hero { min-height: 235px; padding: 23px 19px; }
    .dashboard-hero h2 { font-size: 36px; }
    .dashboard-hero p { font-size: 13px; }
    .dashboard-overview { gap: 12px; margin-bottom: 16px; }
    .dashboard-kpi-grid { gap: 9px; }
    .dashboard-kpi { min-height: 116px; padding: 13px; grid-template-columns: 32px minmax(0, 1fr); column-gap: 9px; }
    .dashboard-kpi .metric-icon { width: 32px; height: 32px; font-size: 14px; }
    .dashboard-kpi > span:not(.metric-icon) { font-size: 9px; line-height: 1.25; }
    .dashboard-kpi > strong { font-size: 27px; }
    .dashboard-kpi > small { font-size: 9px; }
    .dashboard-highlight-grid { gap: 9px; }
    .dashboard-highlight { min-height: 106px; padding: 15px; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
    .dashboard-highlight .metric-icon { width: 40px; height: 40px; }
    .dashboard-highlight strong { font-size: 24px; }
    .dashboard-recent { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .dashboard-recent .panel-head { min-height: 0; margin-bottom: 12px; padding: 0; border: 0; background: transparent; }
    .dashboard-recent .panel-head h3 { font-size: 27px; }
    .dashboard-recent .panel-head p { display: none; }
    .dashboard-recent .panel-head .btn { width: auto; min-height: 38px; align-self: flex-start; }
    .dashboard-table-wrap { display: none; }
    .dashboard-mobile-events { display: grid; gap: 12px; }
    .dashboard-mobile-event { overflow: hidden; border: 1px solid var(--line); border-top: 3px solid #7d9279; border-radius: 8px; background: #fffdf9; box-shadow: 0 8px 24px rgba(60, 20, 30, .07); }
    .dashboard-mobile-event.is-latest { border-top-color: var(--gold-500); }
    .dashboard-mobile-event-head { padding: 13px 14px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
    .dashboard-mobile-event-head time { display: inline-flex; align-items: center; gap: 5px; color: var(--text-secondary); font-size: 11px; font-weight: 600; white-space: nowrap; }
    .dashboard-mobile-event-head time i { color: var(--gold-600); }
    .dashboard-mobile-event h4 { margin: 13px 14px 14px; font-size: 27px; }
    .dashboard-mobile-event-meta { display: grid; gap: 9px; padding: 0 14px 14px; }
    .dashboard-mobile-event-meta p { min-width: 0; margin: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: center; }
    .dashboard-mobile-event-meta > p > i { width: 30px; height: 30px; display: grid; place-items: center; color: var(--gold-600); border: 1px solid #eadcc1; border-radius: 7px; background: #fff7e8; }
    .dashboard-mobile-event-meta span { min-width: 0; display: grid; }
    .dashboard-mobile-event-meta small { color: var(--text-secondary); font-size: 9px; font-weight: 800; text-transform: uppercase; }
    .dashboard-mobile-event-meta strong { overflow-wrap: anywhere; font-size: 12px; }
    .dashboard-mobile-event-stats { padding: 11px 14px; display: flex; gap: 18px; background: #fbf7f1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text-secondary); font-size: 11px; }
    .dashboard-mobile-event-stats span { display: inline-flex; align-items: center; gap: 5px; }
    .dashboard-mobile-event-stats i { color: var(--gold-600); }
    .dashboard-mobile-event-stats strong { color: var(--wine-800); }
    .dashboard-mobile-event-actions { padding: 12px 14px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .dashboard-mobile-event-actions .btn, .dashboard-mobile-event-actions form { width: 100%; }
    .dashboard-mobile-event-actions form { grid-column: 1 / -1; }
    .dashboard-mobile-event-actions .btn { min-height: 42px; }
}

@media (max-width: 380px) {
    .main { padding-inline: 11px; }
    .page-title .actions { grid-template-columns: 1fr; }
    .page-title .actions > * { grid-column: auto; }
    .catalog-card { grid-template-columns: 96px minmax(0, 1fr); }
    .catalog-card-image, .catalog-card-copy { min-height: 158px; height: 158px; }
    .catalog-card h3 { font-size: 19px; }
    .dashboard-mobile-event-head { align-items: flex-start; }
}
.map-matrix-container { position: relative; max-height: 68vh; overflow: auto; isolation: isolate; }
.map-matrix-container .matrix { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.map-matrix-container .matrix th, .map-matrix-container .matrix td { min-width: 64px; padding: 10px 9px; text-align: center; white-space: nowrap; font-size: 13px; }
.map-matrix-container .matrix th:first-child { position: sticky; left: 0; z-index: 3; min-width: 146px; max-width: 146px; overflow: hidden; text-align: left; text-overflow: ellipsis; box-shadow: 4px 0 8px rgba(60, 20, 30, .08); }
.map-matrix-container .matrix tbody th:first-child { color: var(--wine-900); background: #fffdf9; }
.map-matrix-container .matrix tbody tr:hover th:first-child { background: #fffaf3; }
.map-matrix-container .matrix thead th { position: sticky; top: 0; z-index: 2; }
.map-matrix-container .matrix thead th:first-child { z-index: 4; background: #f6ede3; }
.map-matrix-container .matrix tfoot th { position: sticky; bottom: 0; z-index: 2; }
.map-matrix-container .matrix tfoot th:first-child { z-index: 4; background: #f4e7d8; }

/* Evaluators, wines and scoring */
.evaluator-cell { display: flex; align-items: center; gap: 10px; }
.evaluator-cell > div { min-width: 0; display: grid; gap: 4px; }
.evaluator-cell > div strong, .evaluator-cell > div small { display: block; }
.evaluator-cell > div small { color: var(--text-secondary); line-height: 1.25; }
.evaluator-avatar { width: 38px; height: 38px; color: var(--wine-700); background: #f3e6e7; border: 1px solid #e4cdd2; font-size: 12px; }
.removal-blocked { display: inline-flex; align-items: center; gap: 5px; color: #835d17; font-size: 11px; font-weight: 700; white-space: nowrap; }
.removal-blocked i { color: var(--gold-600); }
.section-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.section-summary p { margin: 0; color: var(--text-secondary); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.wine-number-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.number-card { padding: 18px; display: grid; align-content: start; gap: 12px; transition: var(--transition); }
.number-card > strong { color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 23px; }
.number-card > span { color: var(--text-secondary); }
.wine-card-head { display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 12px; }
.wine-card-head strong { color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 21px; }
.wine-card-head p { margin: 3px 0 0; color: var(--wine-700); font-size: 13px; font-weight: 700; }
.wine-thumb, .result-wine-img, .result-table-wine img { border: 1px solid var(--line); background: #fff; object-fit: cover; }
.wine-thumb { width: 68px; height: 88px; border-radius: 9px; }
.wine-thumb.empty { display: grid; place-items: center; overflow: hidden; color: var(--gold-600); background: #fff9ec; }
.wine-bottle-icon { position: relative; width: 25px; height: 48px; margin-top: 8px; border-radius: 8px 8px 5px 5px; background: var(--wine-800); box-shadow: inset 4px 0 0 rgba(255, 255, 255, .1); }
.wine-bottle-icon::before { position: absolute; top: -15px; left: 8px; width: 9px; height: 17px; border-radius: 2px 2px 0 0; background: var(--wine-900); box-shadow: 0 -4px 0 var(--gold-500); content: ""; }
.wine-bottle-icon::after { position: absolute; top: 17px; left: 4px; width: 17px; height: 15px; border: 1px solid var(--gold-400); border-radius: 2px; background: #fff9ec; content: ""; }
.wine-detail-form { gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.wine-detail-form label { font-size: 11px; }
.wine-detail-form .form-control, .wine-detail-form .form-select { min-height: 39px; font-size: 13px; }
.select-row { max-width: 440px; margin-bottom: 20px; }
.current-evaluator { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 15px; background: #fbf4ea; border: 1px solid var(--line); border-radius: var(--radius-md); }
.current-evaluator .evaluator-avatar { width: 48px; height: 48px; color: #fff; background: var(--wine-700); }
.current-evaluator-copy { display: grid; line-height: 1.3; }
.current-evaluator-copy small { color: var(--text-secondary); }
.current-evaluator-copy strong { color: var(--wine-900); font-size: 16px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.score-row { position: relative; padding: 14px; display: grid; gap: 9px; color: var(--wine-900); background: #fffaf3; border: 1px solid var(--line); border-radius: var(--radius-md); transition: var(--transition); }
.score-row:hover, .score-row:focus-within { border-color: var(--gold-500); box-shadow: var(--shadow-sm); }
.score-row span { color: var(--text-secondary); font-family: "Inter", sans-serif; font-size: 11px; text-transform: uppercase; }
.score-input { min-width: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; font-weight: 700; text-align: center; }

/* Avaliações por participante */
.evaluation-accordion { display: grid; gap: 10px; }
.evaluation-accordion-item { overflow: hidden; background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.evaluation-accordion-item > summary { min-height: 76px; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.evaluation-accordion-item > summary::-webkit-details-marker { display: none; }
.evaluation-accordion-item > summary:hover { background: #fffaf3; }
.evaluation-accordion-item[open] > summary { border-bottom: 1px solid var(--line); background: #fffaf3; }
.evaluation-accordion-copy { min-width: 0; display: grid; gap: 2px; }
.evaluation-accordion-copy strong { overflow: hidden; color: var(--wine-900); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.evaluation-accordion-copy small { color: var(--text-secondary); font-size: 12px; }
.evaluation-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.evaluation-status.is-complete { color: #3d603e; }
.evaluation-status.is-pending { color: #835d17; }
.evaluation-chevron { color: var(--gold-600); transition: transform var(--transition); }
.evaluation-accordion-item[open] .evaluation-chevron { transform: rotate(180deg); }
.evaluation-accordion-body { padding: 12px 16px 16px; }
.evaluation-records { display: grid; gap: 7px; }
.evaluation-record { min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 10px 12px; background: #fffdf9; border: 1px solid var(--line); border-radius: 8px; }
.evaluation-record > strong { color: var(--wine-900); font-size: 13px; }
.evaluation-record-score { color: var(--wine-800); font-weight: 700; font-size: 13px; white-space: nowrap; }
.evaluation-record-status { display: inline-flex; align-items: center; gap: 5px; color: #835d17; font-size: 11px; font-weight: 700; white-space: nowrap; }
.evaluation-record-status.is-received { color: #3d603e; }
.evaluation-record.is-pending { background: #fffaf2; }
.evaluation-sheet { grid-column: 1 / -1; margin-top: 2px; }
.evaluation-sheet > summary { width: fit-content; min-height: 34px; padding: 6px 9px; display: inline-flex; align-items: center; gap: 7px; color: var(--wine-700); background: #fff; border: 1px solid var(--line-strong); border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.evaluation-sheet > summary::-webkit-details-marker { display: none; }
.evaluation-sheet > summary:hover { border-color: var(--gold-500); }
.evaluation-sheet > summary i { color: var(--gold-600); transition: transform var(--transition); }
.evaluation-sheet[open] > summary i { transform: rotate(180deg); }
.evaluation-sheet dl { margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.evaluation-sheet dl > div { min-width: 0; padding: 9px; background: #fbf4ea; border: 1px solid var(--line); border-radius: 7px; }
.evaluation-sheet dt { color: var(--text-secondary); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.evaluation-sheet dd { margin: 3px 0 0; color: var(--wine-900); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.evaluation-sheet small { display: block; margin-top: 3px; color: var(--wine-700); font-size: 10px; font-weight: 700; }

/* Results */
.reveal-head { margin-bottom: 24px; padding: clamp(24px, 4vw, 38px); display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; color: #fff; background: linear-gradient(105deg, rgba(43, 13, 22, .98), rgba(84, 20, 38, .88)); border: 1px solid rgba(198, 161, 91, .32); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.reveal-head h2 { margin: 4px 0 7px; color: #fff; font-size: clamp(34px, 4vw, 46px); }
.reveal-head > div > p { margin: 0; color: rgba(255,255,255,.72); }
.reveal-head .eyebrow { color: var(--gold-300); }
.reveal-head dl { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 13px 28px; }
.reveal-head dl div { display: grid; gap: 2px; }
.reveal-head dt { color: var(--gold-300); font-size: 9px; text-transform: uppercase; }
.reveal-head dd { margin: 0; color: #fff; font-size: 12px; font-weight: 700; }
.reveal-locked { min-height: 190px; padding: 30px; display: flex; align-items: center; justify-content: center; gap: 17px; text-align: left; background: #fffaf3; border: 1px solid var(--line); border-radius: var(--radius-md); }
.reveal-locked > i { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; color: var(--gold-600); background: #fff1d4; border-radius: 50%; font-size: 24px; }
.reveal-locked h3 { margin: 0 0 4px; }
.reveal-locked p { margin: 0; color: var(--text-secondary); }
.reveal-progress { margin-bottom: 22px; padding: 19px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; background: #fffaf3; border: 1px solid var(--line); border-radius: var(--radius-md); }
.reveal-progress > div:not(.progress) { display: grid; gap: 3px; }
.reveal-progress span { color: var(--text-secondary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.reveal-progress strong { color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 27px; }
.reveal-progress .progress { grid-column: 1 / -1; }
.reveal-grid { display: grid; gap: 13px; }
.reveal-card { overflow: hidden; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); scroll-margin-top: 20px; }
.reveal-card.is-revealed { border-left: 3px solid #6f8a64; }
.reveal-card-preview { min-height: 198px; padding: 16px; display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 17px; }
.reveal-photo { width: 110px; height: 166px; display: grid; place-items: center; overflow: hidden; color: var(--gold-600); background: transparent; border: 0; border-radius: 0; font-size: 37px; }
.reveal-photo img {
    width: 110px;
    height: 166px;
    display: block;
    border: 0;
    background: transparent;
    object-fit: contain;
}
.reveal-card-copy { min-width: 0; }
.reveal-card-copy h3 { margin: 3px 0 4px; overflow-wrap: anywhere; font-size: 25px; }
.reveal-card-copy p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.reveal-card-copy small { color: var(--text-secondary); }
.reveal-card-copy small strong { color: var(--wine-800); }
.reveal-card-state { display: grid; justify-items: end; gap: 9px; }
.reveal-card-state form { margin: 0; }
.reveal-editor { border-top: 1px solid var(--line); }
.reveal-editor > summary { min-height: 47px; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; color: var(--wine-700); cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; }
.reveal-editor > summary::-webkit-details-marker { display: none; }
.reveal-editor > summary:hover { background: #fffaf3; }
.reveal-editor > summary i { color: var(--gold-600); transition: transform var(--transition); }
.reveal-editor[open] > summary i { transform: rotate(180deg); }
.reveal-form { padding: 17px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; background: #fbf5ed; border-top: 1px solid var(--line); }
.reveal-form .full { grid-column: 1 / -1; }
.reveal-form label small { color: var(--text-secondary); font-weight: 500; }
.reveal-form-actions { display: flex; justify-content: flex-end; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 18px; margin: 36px 0 24px; }
.result-wine-placeholder { width: 92px; height: 124px; margin: 0 auto 12px; display: grid; place-items: center; color: var(--gold-600); background: #fff9ec; border: 1px solid var(--line); border-radius: 8px; font-size: 38px; }
.result-table-placeholder { width: 34px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; color: var(--gold-600); background: #fff9ec; border: 1px solid var(--line); border-radius: 6px; font-size: 17px; }
.podium-card { position: relative; min-height: 390px; padding: 25px 20px; text-align: center; background: linear-gradient(180deg, #fffdf9, #f7ecdd); overflow: hidden; }
.podium-card.place-1 { order: 2; min-height: 440px; padding-top: 34px; color: #fff; background: linear-gradient(150deg, var(--wine-900), var(--wine-700)); border-color: var(--gold-500); box-shadow: 0 18px 45px rgba(43, 13, 22, .22); }
.podium-card.place-2 { order: 1; }
.podium-card.place-3 { order: 3; }
.podium-card.place-1::before { content: ""; position: absolute; width: 180px; height: 180px; top: -100px; right: -70px; border: 1px solid rgba(226, 200, 140, .2); border-radius: 50%; }
.podium-card h3 { margin: 10px 0; color: var(--wine-700); font-size: 29px; }
.podium-card strong { display: block; color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 27px; }
.podium-card p { margin: 16px 0 10px; color: var(--olive); font-family: "Cormorant Garamond", Georgia, serif; font-size: 27px; font-weight: 700; }
.podium-card.place-1 h3, .podium-card.place-1 strong, .podium-card.place-1 .result-wine-name, .podium-card.place-1 p { color: #fff; }
.podium-card.place-1 .wine-meta span { color: #fff; background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .2); }
.medal { width: 54px; height: 54px; display: inline-grid; place-items: center; color: var(--wine-950); background: var(--gold-500); border: 5px solid rgba(255, 255, 255, .55); border-radius: 50%; font-size: 20px; font-weight: 800; box-shadow: 0 7px 18px rgba(60, 20, 30, .15); }
.result-wine-img {
    width: 110px;
    height: 166px;
    margin: 0 auto 13px;
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
}
.result-wine-name { margin-top: 7px; color: var(--wine-800); font-weight: 700; }
.wine-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.wine-meta span { display: inline-flex; align-items: center; gap: 5px; color: var(--olive); background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 700; }
.wine-meta.compact { justify-content: flex-start; margin-top: 4px; }
.wine-data-list { display: grid; gap: 3px; margin-top: 6px; color: var(--text-secondary); font-size: 12px; }
.wine-data-list strong { color: var(--wine-900); }
.result-table-wine { display: flex; align-items: center; gap: 10px; }
.result-table-wine img {
    width: 110px;
    height: 166px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
}
.flag-icon { width: 18px; height: 12px; display: inline-block; flex: 0 0 auto; object-fit: cover; border: 1px solid rgba(35, 31, 32, .18); border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); vertical-align: -1px; }
.flag-generic { background: linear-gradient(135deg, #fff 0 50%, #d8d0c2 50%); }

/* Feedback, modal and empty states */
.toast-stack { position: fixed; z-index: 1090; top: 20px; right: 20px; width: min(390px, calc(100% - 32px)); display: grid; gap: 10px; }
.app-toast { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 14px; color: #315037; background: #f4fbf4; border: 1px solid #c8dec9; border-radius: var(--radius-md); box-shadow: var(--shadow-raised); animation: toast-in 220ms ease both; }
.app-toast.toast-danger, .app-toast.toast-warning { color: #7f3037; background: #fff6f6; border-color: #ebc8cb; }
.app-toast > i { font-size: 19px; }
.app-toast button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: inherit; }
.app-toast.is-leaving { animation: toast-out 220ms ease both; }
.premium-modal .modal-content { position: relative; padding: 30px; align-items: center; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.premium-modal .modal-icon { width: 54px; height: 54px; margin-bottom: 16px; display: grid; place-items: center; color: #815a1b; background: #fff4d8; border-radius: 50%; font-size: 22px; }
.premium-modal h2 { margin-bottom: 8px; font-size: 29px; }
.premium-modal p { color: var(--text-secondary); }
.delete-confraria-modal .modal-icon { color: var(--danger); background: #fff1f1; }
.delete-confirm-label { width: 100%; margin-top: 8px; text-align: left; }
.delete-confirm-label strong { color: var(--danger); }
.admin-identity { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.admin-identity > img, .admin-identity > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--wine-700); background: #f3e6e7; font-weight: 700; object-fit: cover; }
.admin-identity div { display: grid; gap: 2px; }
.admin-identity small { color: var(--text-secondary); }
.admin-form-panel { max-width: 880px; }
.metric small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.modal-actions { width: 100%; display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.empty-state { padding: 42px 20px; display: grid; place-items: center; gap: 8px; text-align: center; color: var(--text-secondary); background: rgba(255, 255, 255, .5); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); }
.empty-state i { color: var(--gold-600); font-size: 32px; }
.empty-state h3 { margin: 0; }
.empty-state p { margin: 0; }
.form-divider { position: relative; margin: 22px 0; text-align: center; color: var(--text-secondary); font-size: 11px; }
.form-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid var(--line); }
.form-divider span { position: relative; z-index: 1; padding: 0 10px; background: #fffdfb; }
.subsection-title { margin: 0 0 14px; font-size: 19px; }

/* Portal do Avaliador */
.portal-body { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(135deg, #fcfaf6 0%, #f3e8da 100%); }
.portal-header { min-height: 74px; padding: 10px clamp(18px, 5vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 18px; background: var(--wine-900); border-bottom: 1px solid rgba(226, 200, 140, .22); box-shadow: 0 3px 18px rgba(43, 13, 22, .16); }
.portal-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.portal-brand:hover { color: #fff; }
.portal-brand img { width: 56px; height: 52px; object-fit: contain; }
.portal-brand span { display: grid; line-height: 1.1; }
.portal-brand strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; letter-spacing: .5px; }
.portal-brand small { color: var(--gold-300); font-size: 10px; }
.portal-user { display: flex; align-items: center; gap: 14px; color: rgba(255, 255, 255, .85); font-size: 13px; }
.portal-user .btn-outline-wine { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); }
.portal-account-link { min-height: 38px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.78); border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; }
.portal-account-link:hover, .portal-account-link.active { color: var(--gold-300); background: rgba(255,255,255,.08); border-color: rgba(226,200,140,.24); }
.portal-header-avatar-link { flex: 0 0 auto; display: inline-flex; border-radius: 50%; }
.portal-header-avatar-link:focus-visible { outline: 3px solid rgba(226,200,140,.55); outline-offset: 2px; }
.portal-header-avatar { width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; color: var(--wine-900); background: var(--gold-300); border: 2px solid rgba(226,200,140,.5); border-radius: 50%; font-size: 15px; font-weight: 800; transition: border-color var(--transition); }
.portal-header-avatar-link:hover .portal-header-avatar { border-color: var(--gold-500); }
.portal-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.portal-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.portal-nav a { min-height: 40px; padding: 8px 11px; display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.72); border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; }
.portal-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.portal-nav a.active { color: var(--gold-300); background: rgba(255,255,255,.09); border-color: rgba(226,200,140,.24); }
.portal-nav a.portal-nav-search { color: var(--wine-900); background: var(--gold-300); border-color: var(--gold-300); box-shadow: 0 5px 15px rgba(0,0,0,.12); }
.portal-nav a.portal-nav-search:hover { color: var(--wine-900); background: var(--gold-500); border-color: var(--gold-500); }
.portal-nav a.portal-nav-search.active { color: var(--wine-900); background: var(--gold-300); border-color: var(--gold-300); box-shadow: 0 5px 15px rgba(0,0,0,.15); }
.portal-main { width: min(1120px, calc(100vw - 32px)); max-width: calc(100% - 32px); min-width: 0; flex: 1 0 auto; margin: 0 auto; padding: clamp(32px, 6vw, 72px) 0; }

.settings-panel { max-width: 1040px; }
.settings-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-upload { min-width: 0; padding: 18px; display: grid; justify-items: center; gap: 10px; color: var(--wine-900); background: #fffdf9; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 700; text-align: center; }
.settings-upload > span:first-child { align-self: flex-start; }
.settings-upload input[type="file"] { width: 100%; }
.settings-upload small, .settings-copy-grid small { color: var(--text-secondary); font-size: 11px; font-weight: 400; }
.settings-preview { width: 140px; height: 140px; margin: 0 auto; padding: 12px; display: grid; place-items: center; overflow: hidden; background: var(--surface-soft); border: 1px dashed var(--line-strong); border-radius: 10px; }
.settings-preview img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.settings-preview i { color: var(--gold-600); font-size: 42px; }
.settings-copy-head { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.settings-copy-grid { grid-template-columns: minmax(240px, .75fr) minmax(320px, 1.25fr); }
.settings-copy-grid label { align-content: start; }
.settings-actions { margin-top: 22px; }

.backup-panel { max-width: 1040px; }
.backup-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.backup-card { min-width: 0; padding: 20px; display: grid; gap: 12px; align-content: start; background: #fffdf9; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(60, 20, 30, .05); }
.backup-card-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--gold-700); background: #fff4dc; border: 1px solid #ead7aa; border-radius: 9px; font-size: 19px; }
.backup-card-body { display: grid; gap: 10px; }
.backup-card-body h4 { margin: 0; color: var(--wine-900); font-size: 19px; }
.backup-card-body > p { margin: 0; color: var(--text-secondary); font-size: 12.5px; }
.backup-card-body form { display: grid; gap: 10px; }
.backup-select-label { display: grid; gap: 6px; color: var(--wine-900); font-size: 12px; font-weight: 700; }
.backup-restore-error { margin: 0; padding: 8px 10px; color: #9d2933; background: #fff3f3; border: 1px solid #ebc8cb; border-radius: 6px; font-size: 12px; font-weight: 600; }
.backup-summary { display: grid; gap: 12px; padding-top: 4px; border-top: 1px dashed var(--line); margin-top: 4px; }
.backup-summary-list { margin: 0; display: grid; gap: 8px; }
.backup-summary-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.backup-summary-list dt { margin: 0; color: var(--gold-700); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.backup-summary-list dd { margin: 0; color: var(--wine-900); font-size: 13px; font-weight: 700; text-align: right; }
.backup-warning { margin: 0; padding: 10px 12px; display: flex; align-items: center; gap: 8px; color: #7a4b00; background: #fff6e0; border: 1px solid #f0dba3; border-radius: 7px; font-size: 12px; font-weight: 600; }
.backup-confirm-typed { display: grid; gap: 6px; color: var(--wine-900); font-size: 12px; font-weight: 700; }
.backup-exists-warning { margin: 0; padding: 10px 12px; display: flex; align-items: center; gap: 8px; color: #9d2933; background: #fff3f3; border: 1px solid #ebc8cb; border-radius: 7px; font-size: 12px; font-weight: 700; }
.backup-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.portal-wine-search { width: min(980px, 100%); margin: 0 auto; }
.portal-wine-search-head { margin-bottom: 22px; }
.portal-wine-search-head h1 { margin: 4px 0 7px; color: var(--wine-900); font-size: clamp(36px, 6vw, 48px); }
.portal-wine-search-head p { margin: 0; color: var(--text-secondary); }
.portal-wine-search-controls { padding: 16px; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); }
.portal-wine-mode-filter { width: min(100%, 300px); margin-bottom: 14px; padding: 3px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; background: #f5ede4; border: 1px solid var(--line); border-radius: 7px; }
.portal-wine-mode-filter button { min-height: 39px; padding: 7px 12px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; color: var(--wine-700); background: transparent; border: 0; border-radius: 5px; font-size: 12px; font-weight: 800; }
.portal-wine-mode-filter button:hover { background: rgba(255,255,255,.72); }
.portal-wine-mode-filter button.active { color: #fff; background: var(--wine-700); box-shadow: 0 3px 9px rgba(83, 11, 32, .16); }
.portal-wine-mode-filter button[data-champions="1"].active { color: var(--wine-900); background: var(--gold-300); }
.portal-wine-mode-filter button:focus-visible { outline: 3px solid rgba(198,161,91,.42); outline-offset: 2px; }
.portal-wine-search-input { display: grid; gap: 7px; color: var(--wine-900); font-size: 13px; font-weight: 700; }
.portal-wine-search-field { position: relative; display: block; }
.portal-wine-search-field > i { position: absolute; z-index: 1; top: 50%; left: 14px; color: var(--gold-600); transform: translateY(-50%); }
.portal-wine-search-field .form-control { min-height: 52px; padding-right: 42px; padding-left: 42px; background: #fffdf9; font-size: 16px; }
.portal-wine-search-field .spinner-border { position: absolute; top: calc(50% - 8px); right: 15px; width: 16px; height: 16px; color: var(--wine-700); }
.portal-country-filter { margin-top: 13px; padding-bottom: 2px; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.portal-country-chip { min-height: 36px; padding: 7px 12px; flex: 0 0 auto; color: var(--wine-700); background: #fffaf3; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12px; font-weight: 700; }
.portal-country-chip:hover { border-color: var(--gold-500); }
.portal-country-chip.active { color: #fff; background: var(--wine-700); border-color: var(--wine-700); }
.portal-country-chip:focus-visible { outline: 3px solid rgba(198,161,91,.4); outline-offset: 2px; }
.portal-wine-results-head { min-height: 42px; padding: 18px 2px 8px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.portal-wine-results { display: grid; gap: 12px; }
.portal-wine-card { min-width: 0; padding: 14px; display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 15px; align-items: start; background: rgba(255,255,255,.84); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); }
.portal-wine-card.is-champion { border-color: rgba(198,161,91,.65); box-shadow: 0 7px 22px rgba(83, 11, 32, .08); }
.portal-wine-photo { width: 82px; height: 112px; margin: 0; padding: 5px; display: grid; place-items: center; overflow: hidden; color: var(--gold-600); background: #fff9ec; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 31px; }
.portal-wine-card-is-champion { grid-template-columns: 110px minmax(0, 1fr); }
.portal-wine-photo-is-champion { width: 110px; height: 154px; padding: 8px; align-self: start; }
button.portal-wine-photo { cursor: zoom-in; transition: border-color var(--transition), box-shadow var(--transition); }
button.portal-wine-photo:hover { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(198,161,91,.13); }
button.portal-wine-photo:focus-visible { outline: 3px solid rgba(198,161,91,.42); outline-offset: 2px; }
.portal-wine-photo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.portal-wine-card-content { min-width: 0; display: grid; gap: 10px; }
.portal-wine-champion-card-content { min-width: 0; gap: 10px; }
.portal-wine-title-row { min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px 9px; }
.portal-wine-card h2 { margin: 0; overflow-wrap: anywhere; color: var(--wine-900); font-size: 24px; line-height: 1.05; }
.portal-wine-champion-badge { min-height: 24px; padding: 4px 7px; display: inline-flex; align-items: center; gap: 5px; color: #76500b; background: #fff2c9; border: 1px solid #e8cc82; border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; white-space: nowrap; }
.portal-wine-champion-badge i { font-size: 10px; }
.portal-wine-note-badge { min-height: 24px; margin: 0; padding: 4px 7px; display: inline-flex; align-items: center; gap: 5px; color: var(--wine-900); background: var(--gold-300); border: 1px solid var(--gold-500); border-radius: 999px; font: inherit; font-size: 9px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.portal-wine-note-badge i { font-size: 10px; }
.portal-wine-note-badge:hover, .portal-wine-note-badge[aria-expanded="true"] { background: var(--gold-500); }
.portal-wine-note { padding: 10px 12px; display: grid; gap: 4px; background: #fffaf3; border: 1px solid #eadcc1; border-left: 3px solid var(--gold-500); border-radius: 8px; }
.portal-wine-note strong { color: var(--wine-900); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.portal-wine-note p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-line; }
.portal-wine-facts { display: grid; gap: 5px; color: var(--text-secondary); font-size: 11px; }
.portal-wine-fact { min-width: 0; display: flex; align-items: flex-start; gap: 6px; overflow-wrap: anywhere; }
.portal-wine-fact i { flex: 0 0 13px; margin-top: 1px; color: var(--gold-600); }
.portal-wine-participated { width: fit-content; display: inline-flex; align-items: center; gap: 6px; color: #9b2935; font-size: 12px; }
.portal-wine-championships { padding: 8px 10px; display: grid; gap: 6px; background: rgba(255,242,201,.42); border-left: 2px solid var(--gold-500); }
.portal-wine-championship { min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; color: var(--wine-800); font-size: 11px; }
.portal-wine-championship strong { min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.portal-wine-championship strong i { flex: 0 0 auto; color: var(--gold-600); }
.portal-wine-championship span { color: #76500b; font-weight: 800; white-space: nowrap; }
.portal-wine-history { padding-top: 9px; border-top: 1px solid var(--line); }
.portal-wine-history > span { display: block; margin-bottom: 5px; color: var(--text-secondary); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.portal-wine-history ul { margin: 0; padding: 0; display: grid; gap: 5px; list-style: none; }
.portal-wine-history li { min-width: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; color: var(--wine-800); font-size: 11px; }
.portal-wine-history li strong { overflow-wrap: anywhere; }
.portal-wine-history li small { color: var(--text-secondary); }
.portal-wine-empty { padding: 34px 20px; display: grid; justify-items: center; gap: 7px; text-align: center; color: #315b3b; background: rgba(248,255,248,.82); border: 1px solid #c9ddca; border-radius: 8px; }
.portal-wine-empty > i { font-size: 31px; }
.portal-wine-empty h2 { margin: 2px 0 0; color: #294d32; font-size: 25px; }
.portal-wine-empty p { max-width: 570px; margin: 0; color: var(--text-secondary); font-size: 12px; }
.portal-wine-empty.is-error { color: #9b2935; background: #fff7f7; border-color: #ecc8cc; }
.portal-wine-empty.is-error h2 { color: #7f3037; }
.portal-wine-lightbox[hidden] { display: none; }
.portal-wine-lightbox { position: fixed; inset: 0; z-index: 1090; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); display: grid; place-items: center; background: rgba(25, 7, 13, .88); }
.portal-wine-lightbox-content { width: min(620px, 100%); height: min(82vh, 760px); padding: 18px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; color: #fff; text-align: center; background: #fffdf9; border: 1px solid rgba(226,200,140,.55); border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.portal-wine-lightbox-content img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.portal-wine-lightbox-content strong { color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; }
.portal-wine-lightbox-close { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 1; width: 46px; height: 46px; display: grid; place-items: center; color: #fff; background: var(--wine-700); border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font-size: 20px; }
.portal-wine-lightbox-close:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 3px; }
.portal-lightbox-open { overflow: hidden; }

@media (min-width: 760px) {
    .portal-wine-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-wine-empty { grid-column: 1 / -1; }
    .portal-wine-card { grid-template-columns: 92px minmax(0, 1fr); padding: 16px; }
    .portal-wine-photo { width: 92px; height: 126px; }
    .portal-wine-card-is-champion { grid-template-columns: 124px minmax(0, 1fr); }
    .portal-wine-photo-is-champion { width: 124px; height: 182px; }
}

@media (max-width: 759px) {
    .settings-media-grid, .settings-copy-grid { grid-template-columns: 1fr; }
    .portal-body { min-width: 0; min-height: calc(100vh - 30px); margin: 15px; }
    .portal-header { width: calc(100% + 30px); margin: -15px -15px 10px; }
    .portal-wine-mode-filter { width: 100%; }
    .portal-wine-card { grid-template-columns: clamp(84px, 28vw, 116px) minmax(0, 1fr); padding: 10px; gap: 12px; }
    .portal-wine-photo { width: 100%; height: clamp(220px, 48vw, 210px); padding: 7px; align-self: start; }
    .portal-wine-card-is-champion { grid-template-columns: clamp(118px, 35vw, 146px) minmax(0, 1fr); }
    .portal-wine-photo-is-champion { width: 100%; height: clamp(260px, 55vw, 244px); padding: 8px; }
    .portal-wine-photo img { object-fit: contain; object-position: center; }
    .portal-wine-card h2 { font-size: 22px; }
    .portal-wine-lightbox { padding-inline: 10px; }
    .portal-wine-lightbox-content { height: min(78vh, 680px); padding: 12px; }
}

/* Assinatura discreta do sistema */
.system-footer { width: 100%; margin-top: auto; padding: 30px 8px 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; color: var(--text-secondary); text-align: center; font-size: 11px; line-height: 1.5; }
.system-footer--portal { max-width: 1120px; margin-right: auto; margin-left: auto; padding: 0 16px 24px; color: rgba(83, 69, 72, .72); }
.system-footer-line { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; }
.system-footer-separator { color: rgba(169, 132, 66, .65); }
.system-footer-version-short { display: none; }
.system-footer a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color var(--transition), text-decoration-color var(--transition); }
.system-footer a:hover { color: var(--gold-600); text-decoration-color: currentColor; }
.system-footer a:focus-visible { color: var(--wine-700); outline: 2px solid rgba(198, 161, 91, .45); outline-offset: 3px; border-radius: 2px; }
.portal-alert { margin: 0 auto 22px; padding: 12px 15px; display: flex; align-items: center; gap: 9px; color: #7f3037; background: #fff5f5; border: 1px solid #ecc8cc; border-radius: var(--radius-md); }
.portal-alert-success { color: #315037; background: #f3fbf4; border-color: #c9dec9; }
.portal-auth-card { width: 488px; max-width: 100%; min-width: 0; margin: 0 auto; overflow: hidden; padding: clamp(27px, 6vw, 43px); text-align: center; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.portal-auth-logo { width: 180px; height: 132px; margin: 0 auto 14px; display: block; object-fit: contain; }
.portal-auth-card h1 { margin: 7px 0 10px; overflow-wrap: anywhere; font-size: clamp(32px, 7vw, 45px); }
.portal-auth-card > p { margin: 0 0 24px; color: var(--text-secondary); }
.portal-form { text-align: left; }
.portal-form .btn { margin-top: 5px; }
.portal-auth-link { margin: 22px 0 0 !important; font-size: 13px; }
.portal-auth-link a, .portal-back { color: var(--wine-700); font-weight: 700; }
.portal-security-icon { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--wine-700); background: #fff1cf; border: 1px solid #ead7aa; border-radius: 50%; font-size: 24px; }
.portal-pin-hint { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; }
.portal-account { width: min(920px, 100%); margin: 0 auto; }
.portal-account-head { margin-top: 0; align-items: start; }
.portal-account-head h1 { margin: 4px 0 7px; color: var(--wine-900); font-size: 42px; }
.portal-account-head p { margin: 0; color: var(--text-secondary); }
.portal-account-grid { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(320px, 1.3fr); gap: 18px; }
.portal-account-profile, .portal-account-security { padding: 24px; background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-card); }
.portal-account-profile { align-content: start; display: grid; gap: 18px; }
.portal-account-avatar { width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; color: var(--gold-700); background: #fff4dc; border: 1px solid #ead7aa; border-radius: 50%; font-size: 24px; font-weight: 800; }
.portal-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.portal-account-photo-actions { margin-top: 4px; text-align: center; }
.portal-account-photo-remove-form { margin: 6px 0 0; text-align: center; }
.portal-account-photo-remove { padding: 0; color: #9b2935; background: none; border: 0; font-size: 12px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.portal-account-photo-remove:hover { color: #7a1f28; }
.portal-account-profile div { padding-top: 13px; display: grid; gap: 3px; border-top: 1px solid var(--line); }
.portal-account-profile small { color: var(--text-secondary); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.portal-account-security h2 { margin: 4px 0 5px; font-size: 29px; }
.portal-account-security > div > p { margin: 0 0 20px; color: var(--text-secondary); font-size: 13px; }
.portal-account-logout { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.portal-account-logout form { margin: 0; }
.portal-back { width: fit-content; margin-bottom: 20px; display: inline-flex; gap: 7px; align-items: center; font-size: 13px; }
.portal-register-card { width: min(690px, 100%); text-align: left; }
.portal-register-card > p { max-width: 480px; }
.portal-result-card { display: grid; place-items: center; gap: 12px; }
.portal-success-icon { width: 58px; height: 58px; display: grid; place-items: center; color: #fff; background: var(--olive); border-radius: 50%; font-size: 26px; }
.portal-welcome { padding: clamp(26px, 5vw, 46px); color: #fff; background: linear-gradient(105deg, rgba(43, 13, 22, .97), rgba(84, 20, 38, .78)), url("https://images.unsplash.com/photo-1506377247377-2a5b3b417ebb?auto=format&fit=crop&w=1600&q=80") center/cover; border: 1px solid rgba(198, 161, 91, .35); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.portal-welcome .eyebrow { color: var(--gold-300); }
.portal-welcome h1 { margin: 6px 0 9px; color: #fff; font-size: clamp(37px, 6vw, 52px); }
.portal-welcome p { margin: 0; color: rgba(255, 255, 255, .74); }
.portal-section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 32px 0 18px; }
.portal-section-head h2 { margin: 4px 0 0; font-size: 32px; }
.portal-section-head > span { color: var(--text-secondary); font-size: 13px; }
.portal-confraria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.portal-confraria-card { position: relative; min-width: 0; padding: 22px; overflow: hidden; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-top: 3px solid var(--gold-500); border-radius: 8px; box-shadow: 0 8px 26px rgba(60, 20, 30, .08); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.portal-confraria-card.is-tasting { border-top-color: var(--wine-500); }
.portal-confraria-card.is-waiting { border-top-color: #b9a88c; }
.portal-confraria-card:hover { transform: translateY(-3px); border-color: var(--gold-300); box-shadow: 0 16px 36px rgba(60, 20, 30, .12); }
.portal-home-welcome h1 i { color: var(--gold-300); font-size: .48em; vertical-align: middle; }
.portal-card-status { min-height: 38px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.portal-card-emblem { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: var(--gold-600); background: #fff7e6; border: 1px solid #ead9b5; border-radius: 50%; font-size: 17px; }
.is-tasting .portal-card-emblem { color: var(--wine-600); background: #fbedf1; border-color: #e8cbd3; }
.portal-confraria-card h2 { margin: 18px 0 16px; color: var(--wine-900); font-size: 30px; line-height: 1; }
.portal-card-details { margin: 0 0 18px; padding: 14px 0; display: grid; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portal-card-details > div { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: center; }
.portal-card-details > div > i { width: 28px; height: 28px; display: grid; place-items: center; color: var(--gold-600); background: var(--cream-100); border-radius: 6px; font-size: 13px; }
.portal-card-details span { min-width: 0; display: grid; gap: 1px; }
.portal-card-details small { color: var(--text-secondary); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.portal-card-details strong { overflow-wrap: anywhere; color: var(--text-primary); font-size: 13px; font-weight: 600; }
.portal-card-cta, .portal-card-cta-tasting { width: 100%; min-height: 46px; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-inline: 15px; }
.portal-card-cta i { font-size: 16px; }
.portal-event-hero .status { margin-bottom: 14px; }
.portal-event-hero p strong { color: #fff; }
.portal-event-hero p span { margin: 0 5px; color: var(--gold-300); }
.portal-event-meta { display: flex; flex-wrap: wrap; gap: 5px 18px; }
.portal-event-meta > span { position: relative; margin: 0 !important; color: inherit !important; }
.portal-event-meta > span + span::before { content: "\2022"; position: absolute; left: -12px; color: var(--gold-300); }
.portal-placeholder { max-width: 690px; margin: 28px auto 0; padding: 46px 28px; text-align: center; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.portal-placeholder > span { width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--gold-600); background: #fff4dc; border-radius: 50%; font-size: 26px; }
.portal-placeholder h2 { margin-bottom: 8px; font-size: 33px; }
.portal-placeholder p { margin-bottom: 22px; color: var(--text-secondary); }

/* Ficha de degustacao */
.portal-event-summary { margin-top: 22px; padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 22px; background: rgba(255, 255, 255, .82); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.portal-event-summary h2 { margin: 4px 0 13px; font-size: 27px; }
.portal-event-summary .progress { width: min(420px, 100%); }
.portal-result-private { display: flex; align-items: center; gap: 10px; max-width: 430px; color: #795d28; font-size: 13px; }
.portal-result-private > i { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--gold-600); background: #fff4dc; border: 1px solid #ead7aa; border-radius: 50%; }
.portal-result-private span { display: grid; gap: 2px; }
.portal-result-private strong { color: var(--wine-900); }
.portal-tallying, .portal-waiting { max-width: 520px; }
.portal-result-ready { max-width: 620px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.portal-result-ready .btn { white-space: nowrap; }
.portal-own-records { margin-top: 30px; }
.portal-record-list { display: grid; gap: 8px; }
.portal-record-list a { min-height: 58px; padding: 12px 15px; display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: var(--transition); }
.portal-record-list a:hover { transform: translateX(2px); border-color: var(--gold-500); }
.portal-record-list span { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.portal-record-list span i { color: var(--olive); }
.portal-record-list strong { color: var(--wine-700); }
.portal-record-list > a > i { color: var(--gold-600); }

/* Resultado oficial do Portal */
.official-result-hero { padding: clamp(28px, 5vw, 48px); color: #fff; background: linear-gradient(102deg, rgba(43, 13, 22, .98), rgba(93, 29, 45, .88)), url("https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&w=1600&q=80") center/cover; border: 1px solid rgba(226, 200, 140, .3); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.official-result-hero .eyebrow { color: var(--gold-300); }
.official-result-hero h1 { margin: 6px 0 10px; color: #fff; font-size: clamp(38px, 6vw, 54px); }
.official-result-hero p { margin: 0; color: rgba(255, 255, 255, .77); }
.official-result-hero p strong { color: #fff; }
.official-result-hero p span { margin: 0 5px; color: var(--gold-300); }
.official-result-notice { margin-top: 18px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; color: #795d28; background: #fff8e9; border: 1px solid #ead7aa; border-radius: var(--radius-md); font-size: 13px; }
.official-result-notice > i { color: var(--gold-600); font-size: 18px; }
.official-result-notice span { display: grid; gap: 2px; }
.official-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 16px; margin: 30px 0 36px; }
.official-place { min-height: 274px; padding: 25px 20px; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; color: var(--wine-900); background: #fffaf3; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.official-place.place-1 { min-height: 318px; color: #fff; background: linear-gradient(155deg, var(--wine-900), var(--wine-700)); border-color: rgba(226, 200, 140, .42); box-shadow: 0 18px 35px rgba(62, 12, 27, .22); order: 2; }
.official-place.place-2 { order: 1; }
.official-place.place-3 { order: 3; }
.official-medal { width: 48px; height: 48px; display: grid; place-items: center; color: var(--wine-900); background: var(--gold-500); border-radius: 50%; font-size: 22px; }
.official-place:not(.place-1) .official-medal { background: #f4e1b5; }
.official-place-label { color: var(--gold-600); font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.official-place.place-1 .official-place-label { color: var(--gold-300); }
.official-place h2 { margin: 0; color: inherit; font-size: 30px; }
.official-place > strong { color: inherit; font-family: "Cormorant Garamond", Georgia, serif; font-size: 30px; line-height: 1; }
.official-place dl { width: 100%; margin: 6px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); }
.official-place dl div { padding: 8px; border-top: 1px solid rgba(84, 20, 38, .13); }
.official-place.place-1 dl div { border-color: rgba(226, 200, 140, .25); }
.official-place dt { color: var(--text-secondary); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.official-place.place-1 dt { color: rgba(255, 255, 255, .64); }
.official-place dd { margin: 2px 0 0; font-size: 14px; font-weight: 700; }
.official-place .tie { margin-top: 3px; }
.official-place { min-height: 430px; }
.official-place.place-1 { min-height: 490px; }
.official-wine-photo { width: 94px; height: 128px; display: grid; place-items: center; overflow: hidden; color: var(--gold-600); background: #fff9ec; border: 1px solid var(--line); border-radius: 8px; font-size: 38px; }
.official-place.place-1 .official-wine-photo { width: 112px; height: 150px; border-color: rgba(226,200,140,.38); }
.official-wine-photo img { width: 100%; height: 100%; object-fit: contain; }
.official-place h3 { margin: 0; color: inherit; font-size: 20px; overflow-wrap: anywhere; }
.official-wine-meta { width: 100%; display: grid; gap: 3px; color: var(--text-secondary); font-size: 11px; }
.official-place.place-1 .official-wine-meta { color: rgba(255,255,255,.72); }
.official-wine-meta b { color: var(--wine-800); }
.official-place.place-1 .official-wine-meta b { color: var(--gold-300); }
.own-wine-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: var(--wine-900); background: var(--gold-300); border: 1px solid rgba(84,20,38,.14); border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.official-ranking-list small.is-own { color: #3d603e; background: #eff6ef; }
.official-ranking { margin: 0 0 44px; }
.official-ranking-list { border-top: 1px solid var(--line); }
.official-ranking-list article { min-height: 70px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; column-gap: 13px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.official-ranking-list .rank-number { color: var(--gold-600); font-family: "Cormorant Garamond", Georgia, serif; font-size: 27px; text-align: center; }
.official-ranking-list article > span { min-width: 0; color: var(--wine-900); font-weight: 700; }
.official-ranking-list article small { margin-left: 6px; color: #835d17; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.official-ranking-list b { color: var(--wine-800); white-space: nowrap; font-size: 14px; }
.official-ranking-list em { grid-column: 2 / -1; color: var(--text-secondary); font-size: 12px; font-style: normal; }
.received-scores, .portal-scoreboard { margin: 0 0 44px; }
.received-score-item, .portal-score-cards details { overflow: hidden; margin-bottom: 8px; background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: var(--radius-md); }
.received-score-item > summary, .portal-score-cards summary { min-height: 62px; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.received-score-item > summary::-webkit-details-marker, .portal-score-cards summary::-webkit-details-marker { display: none; }
.received-score-item > summary > span { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 9px; }
.received-score-item > summary > span > i { grid-row: 1 / span 2; color: var(--gold-600); font-size: 20px; }
.received-score-item summary small { color: var(--text-secondary); }
.received-score-item summary > i, .portal-score-cards summary > i { color: var(--gold-600); transition: transform var(--transition); }
.received-score-item[open] summary > i, .portal-score-cards details[open] summary > i { transform: rotate(180deg); }
.received-score-item > div, .portal-score-cards details > div { padding: 5px 15px 12px; border-top: 1px solid var(--line); }
.received-score-item p, .portal-score-cards p { min-height: 40px; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.received-score-item p:last-child, .portal-score-cards p:last-child { border-bottom: 0; }
.received-score-item p strong { color: var(--wine-800); }
.portal-score-cards { display: none; }
.portal-score-table .matrix th:first-child { position: sticky; left: 0; z-index: 2; min-width: 150px; background: #fffdf9; box-shadow: 4px 0 8px rgba(60, 20, 30, .08); }

/* Resultado oficial premium */
.official-champion { position: relative; min-height: 470px; margin: 30px 0 18px; padding: clamp(28px, 5vw, 54px); display: grid; grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr); align-items: center; gap: clamp(28px, 5vw, 70px); overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--wine-950), var(--wine-700)); border: 1px solid rgba(226, 200, 140, .45); border-radius: var(--radius-lg); box-shadow: 0 24px 58px rgba(43, 13, 22, .24); }
.official-champion::after { position: absolute; inset: 16px; pointer-events: none; border: 1px solid rgba(226, 200, 140, .18); border-radius: 11px; content: ""; }
.official-champion.is-own-wine { border-color: var(--gold-300); box-shadow: 0 24px 62px rgba(84, 20, 38, .3), 0 0 0 3px rgba(198, 161, 91, .18); }
.official-champion-photo { position: relative; z-index: 1; width: min(100%, 270px); aspect-ratio: 3 / 4; margin: 0 auto; /*display: grid; place-items: center;*/ overflow: hidden; color: var(--gold-500); background: var(--cream-50); border: 1px solid rgba(226, 200, 140, .5); border-radius: 8px; font-size: 58px; box-shadow: 0 18px 38px rgba(0, 0, 0, .22); }
.official-champion-photo img { width: 100%; height: 310px; padding: 12px; object-fit: contain; }
.portal-result-photo-trigger { width: 100%; height: 100%; padding: 0; display: block; border: 0; background: transparent; cursor: zoom-in; }
.portal-result-photo-trigger:focus-visible { outline: 3px solid var(--gold-400); outline-offset: -4px; }
.portal-result-photo-trigger img { display: block; }
.official-champion-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 11px; }
.official-champion-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--gold-300); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.official-champion-kicker i { font-size: 22px; }
.official-champion .own-wine-badge { position: static; color: var(--wine-900); background: var(--gold-300); }
.official-champion-number { color: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.official-champion h2 { max-width: 680px; margin: 0; color: #fff; font-size: 48px; overflow-wrap: anywhere; }
.official-champion-meta { display: grid; gap: 6px; color: rgba(255, 255, 255, .76); font-size: 13px; }
.official-champion-meta span { display: flex; align-items: flex-start; gap: 8px; }
.official-champion-meta i { width: 16px; color: var(--gold-300); text-align: center; }
.official-champion-score { margin-top: 9px; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 8px; }
.official-champion-score strong { color: #fff; font-family: "Cormorant Garamond", Georgia, serif; font-size: 52px; line-height: .9; }
.official-champion-score > span { color: var(--gold-300); font-weight: 700; }
.official-champion-score small { grid-column: 1 / -1; margin-top: 5px; color: rgba(255, 255, 255, .65); }
.official-runner-ups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 38px; }
.official-runner { position: relative; min-height: 178px; padding: 20px; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 18px; background: rgba(255, 255, 255, .82); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.official-runner-medal { position: absolute; top: 12px; right: 12px; color: var(--gold-600); font-size: 20px; }
.official-runner-photo { width: 72px; height: 177px; display: grid; place-items: center; overflow: hidden; color: var(--gold-600); background: #fff9ec; border: 1px solid var(--line); border-radius: 8px; font-size: 28px; }
.official-runner-photo img { width: 100%; height: 100%; padding: 5px; object-fit: contain; }
.official-runner h3 { margin: 3px 28px 3px 0; font-size: 25px; overflow-wrap: anywhere; }
.official-runner p { margin: 0 0 8px; color: var(--text-secondary); font-size: 12px; }
.official-runner strong { color: var(--wine-800); }
.own-wine-inline { width: fit-content; margin-top: 7px; display: block; padding: 3px 7px; color: #426043; background: #edf6ed; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.official-ranking-list article { grid-template-columns: 48px 54px minmax(0, 1fr) auto; }
.official-ranking-thumb { width: 46px; height: px; display: grid; place-items: center; overflow: hidden; color: var(--gold-600); background: #fff9ec; border: 1px solid var(--line); border-radius: 7px; }
.official-ranking-thumb img { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.official-ranking-name { display: block !important; min-width: 0; }
.official-ranking-name > strong { display: block; overflow-wrap: anywhere; }
.official-ranking-name > small { display: inline-block; margin: 3px 6px 0 0; color: var(--text-secondary); font-size: 11px; font-weight: 500; text-transform: none; }
.official-ranking-name .rank-tag, .official-ranking-name .is-own { padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.official-ranking-list article > em { grid-column: 3 / -1; }
.official-ranking-list article.is-own-ranking { margin-inline: -8px; padding-inline: 12px; background: #fff9e9; border-left: 3px solid var(--gold-500); }
.tasting-header { margin-bottom: 22px; padding: 23px; color: #fff; background: linear-gradient(110deg, var(--wine-900), var(--wine-700)); border: 1px solid rgba(226, 200, 140, .28); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
.tasting-header .eyebrow { color: var(--gold-300); }
.tasting-header h1 { margin: 5px 0 14px; color: #fff; font-size: clamp(34px, 6vw, 45px); }
.tasting-meta { margin-bottom: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; color: rgba(255,255,255,.78); font-size: 13px; }
.tasting-header small { display: block; margin-top: 7px; color: var(--gold-300); font-size: 11px; }
.tasting-success { margin-bottom: 20px; padding: 20px; display: flex; align-items: center; gap: 16px; background: #f2faf2; border: 1px solid #c7ddc8; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.tasting-success > span, .tasting-complete-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--olive); border-radius: 50%; font-size: 21px; }
.tasting-success h2 { margin: 0 0 3px; font-size: 27px; }
.tasting-success p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.tasting-success .btn { margin-left: auto; }
.wine-picker { padding: clamp(20px, 4vw, 30px); background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.wine-picker h2 { margin: 4px 0 5px; font-size: 31px; }
.wine-picker p { margin: 0 0 20px; color: var(--text-secondary); }
.wine-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.wine-choice { position: relative; min-height: 96px; padding: 12px 8px; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--wine-900); background: #fffaf4; border: 1px solid var(--line-strong); border-radius: var(--radius-md); text-align: center; transition: var(--transition); }
.wine-choice:hover { transform: translateY(-2px); color: var(--wine-700); border-color: var(--gold-500); box-shadow: var(--shadow-sm); }
.wine-choice strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 37px; line-height: .9; }
.wine-choice small { color: var(--text-secondary); font-size: 10px; }
.wine-choice.is-current { color: #fff; background: var(--wine-700); border-color: var(--wine-700); }
.wine-choice.is-current small { color: var(--gold-300); }
.wine-choice.is-done { cursor: not-allowed; color: var(--olive); background: #f2f8f2; border-color: #c9ddca; }
.wine-choice.is-done i { position: absolute; top: 8px; right: 8px; font-size: 13px; }
.tasting-current { margin-top: 24px; padding: 22px; text-align: center; color: #fff; background: var(--wine-800); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.tasting-current span { color: var(--gold-300); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.tasting-current h2 { margin: 4px 0 0; color: #fff; font-size: 32px; }
.tasting-form { padding-bottom: 88px; }
.tasting-section { margin: 0; padding: clamp(20px, 4vw, 30px); background: rgba(255,255,255,.84); border: 1px solid var(--line); border-top: 0; transition: border-color var(--transition), background var(--transition); }
.tasting-section:last-of-type { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.tasting-section.is-complete { background: #fbfffa; border-color: #c9ddc9; }
.tasting-section-title { display: flex; justify-content: space-between; gap: 16px; }
.tasting-section h2 { margin: 0 0 5px; font-size: 28px; }
.tasting-section p { margin: 0 0 17px; color: var(--text-secondary); font-size: 13px; }
.section-check { display: none; width: 26px; height: 26px; color: var(--olive); font-size: 20px; }
.tasting-section.is-complete .section-check { display: block; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; }
.choice-card { position: relative; min-height: 46px; display: block; margin: 0; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { min-height: 46px; padding: 10px 12px; display: flex; align-items: center; justify-content: center; color: var(--wine-800); background: #fffaf5; border: 1px solid var(--line-strong); border-radius: 9px; text-align: center; font-size: 13px; font-weight: 650; transition: var(--transition); }
.choice-card input:checked + span { color: #fff; background: var(--wine-700); border-color: var(--wine-700); box-shadow: 0 5px 12px rgba(84,20,38,.17); }
.choice-card input:focus-visible + span { outline: 3px solid rgba(198,161,91,.42); outline-offset: 2px; }
.score-choice { margin-top: 22px; }
.score-choice > span { display: block; margin-bottom: 9px; color: var(--wine-900); font-size: 13px; font-weight: 700; }
.score-choice-grid { display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 8px; max-width: 470px; }
.score-choice-grid label { position: relative; min-height: 48px; display: block; cursor: pointer; }
.score-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.score-choice-grid span { height: 100%; display: grid; place-items: center; color: var(--wine-800); background: #fffaf5; border: 1px solid var(--line-strong); border-radius: 9px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; font-weight: 700; transition: var(--transition); }
.score-choice-grid input:checked + span { color: #fff; background: var(--wine-700); border-color: var(--wine-700); box-shadow: 0 6px 13px rgba(84,20,38,.2); }
.score-choice-grid input:focus-visible + span { outline: 3px solid rgba(198,161,91,.42); outline-offset: 2px; }
.tasting-note { margin: 0; padding: clamp(20px, 4vw, 30px); background: rgba(255,255,255,.84); border: 1px solid var(--line); border-top: 0; }
.tasting-note label { display: block; margin-bottom: 8px; color: var(--wine-900); font-weight: 700; font-size: 14px; }
.tasting-note label small { color: var(--text-secondary); font-weight: 500; text-transform: none; }
.tasting-note textarea { width: 100%; min-height: 90px; padding: 12px 14px; color: var(--text-primary); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); font: inherit; font-size: 14px; resize: vertical; }
.tasting-note textarea:focus { outline: none; border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(198, 161, 91, .14); }
.tasting-total { position: sticky; bottom: 12px; z-index: 10; margin-top: 20px; padding: 12px 14px 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #fff; background: rgba(43,13,22,.97); border: 1px solid rgba(226,200,140,.34); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); }
.tasting-total div { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 8px; }
.tasting-total span { grid-column: 1 / -1; color: var(--gold-300); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.tasting-total strong { display: flex; align-items: baseline; gap: 5px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 39px; line-height: .9; }
.tasting-total strong b { font: inherit; }
.tasting-total strong small { color: rgba(255,255,255,.66); font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 14px; font-weight: 600; }
.tasting-total small { color: rgba(255,255,255,.66); }
.tasting-total .btn { flex: 0 0 auto; }
.tasting-inline-error { margin: 0 0 14px; padding: 10px 12px; color: #842e36; background: #fff2f3; border: 1px solid #e9c5ca; border-radius: 8px; font-size: 13px; font-weight: 600; }
.tasting-confirm-backdrop { position: fixed; inset: 0; z-index: 1200; padding: 18px; display: grid; place-items: center; background: rgba(30,8,14,.58); opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.tasting-confirm-backdrop.is-open { opacity: 1; pointer-events: auto; }
.tasting-confirm { width: min(420px, 100%); padding: 28px; text-align: center; background: var(--cream-50); border: 1px solid var(--gold-300); border-radius: var(--radius-lg); box-shadow: 0 22px 70px rgba(0,0,0,.28); transform: translateY(10px); transition: transform var(--transition); }
.tasting-confirm-backdrop.is-open .tasting-confirm { transform: translateY(0); }
.tasting-confirm > span { width: 54px; height: 54px; margin: 0 auto 15px; display: grid; place-items: center; color: var(--wine-700); background: #f4e4e5; border-radius: 50%; font-size: 23px; }
.tasting-confirm h2 { margin-bottom: 8px; font-size: 31px; }
.tasting-confirm p { color: var(--text-secondary); font-size: 13px; }
.tasting-confirm strong { display: block; margin: 15px 0; color: var(--wine-800); font-size: 16px; }
.tasting-confirm > div { display: flex; justify-content: center; gap: 8px; }
.tasting-complete { max-width: 610px; margin: 30px auto; padding: 40px 26px; display: grid; place-items: center; gap: 10px; text-align: center; background: rgba(255,255,255,.84); border: 1px solid #c8ddc9; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.tasting-complete .tasting-complete-icon { width: 64px; height: 64px; color: #745821; background: #fff0c9; font-size: 28px; }
.tasting-complete h2 { margin: 5px 0 0; font-size: 37px; }
.tasting-complete p { margin: 0; color: var(--text-secondary); }
.tasting-complete small { color: var(--wine-700); font-weight: 700; }
.tasting-complete .eyebrow { width: auto; height: auto; margin-top: 3px; display: inline; color: var(--gold-600); background: transparent; border-radius: 0; font-size: 11px; }
.detail-sheet { max-width: 760px; margin: 28px auto 0; padding: clamp(22px, 5vw, 38px); background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.detail-total { margin-bottom: 25px; padding: 18px; display: grid; justify-items: center; color: #fff; background: var(--wine-800); border-radius: var(--radius-md); }
.detail-total span { color: var(--gold-300); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.detail-total strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 55px; line-height: .95; }
.detail-total small { color: rgba(255,255,255,.7); }
.detail-sheet dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.detail-sheet dl div { padding: 14px; background: #fffaf4; border: 1px solid var(--line); border-radius: 9px; }
.detail-sheet dt { margin-bottom: 3px; color: var(--text-secondary); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.detail-sheet dd { margin: 0; color: var(--wine-900); font-size: 14px; }
.detail-sheet dd strong { float: right; color: var(--wine-700); }

/* Degustacao ao vivo - administrativo */
.live-head { min-height: 160px; }
.live-update-status { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 10px; color: var(--gold-300); background: rgba(255,255,255,.08); border: 1px solid rgba(226,200,140,.22); border-radius: 999px; font-size: 11px; }
.live-metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.live-progress-panel .panel-head { margin-bottom: 12px; }
.live-progress-panel > p { margin: 12px 0 0; }
.live-complete-message { color: var(--olive); font-weight: 700; }
.live-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.live-list { display: grid; gap: 9px; }
.live-list-item { padding: 13px; background: #fffaf4; border: 1px solid var(--line); border-radius: 9px; }
.live-list-item.is-complete { background: #f4faf4; border-color: #c9ddca; }
.live-list-main { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; }
.live-list-main strong { color: var(--wine-900); }
.live-list-main > span { color: var(--text-secondary); font-size: 12px; }
.live-status { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 11px; font-weight: 700; }
.live-status.complete { color: var(--olive); }
.live-status.pending { color: #85621d; }
.live-list-item details { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.live-list-item summary { color: var(--wine-700); cursor: pointer; font-size: 12px; font-weight: 700; }
.live-list-item details p { margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; }
.live-recent-list { display: grid; gap: 8px; }
.live-recent-item { min-height: 60px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; background: #fffaf4; border: 1px solid var(--line); border-radius: 9px; }
.live-received { color: var(--olive); font-size: 19px; }
.live-recent-item div { display: grid; gap: 2px; }
.live-recent-item strong { color: var(--wine-900); font-size: 13px; }
.live-recent-item small { color: var(--text-secondary); font-size: 11px; }
.live-recent-item b { color: var(--wine-700); font-size: 13px; white-space: nowrap; }
.live-no-detail { color: var(--text-secondary); font-size: 11px; }
.admin-detail-sheet { max-width: 900px; }
.admin-detail-total { width: 150px; margin: 0 auto 25px; padding: 16px; display: grid; place-items: center; color: #fff; background: var(--wine-800); border-radius: var(--radius-md); }
.admin-detail-total span { color: var(--gold-300); font-size: 10px; text-transform: uppercase; font-weight: 700; }
.admin-detail-total strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 48px; line-height: .95; }
.admin-detail-total small { color: rgba(255,255,255,.65); }
.admin-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.admin-detail-grid > div { min-height: 72px; padding: 13px; display: grid; gap: 4px; background: #fffaf4; border: 1px solid var(--line); border-radius: 9px; }
.admin-detail-grid span { color: var(--text-secondary); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.admin-detail-grid strong { color: var(--wine-900); font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* Login */
.login-body { min-height: 100vh; overflow-x: hidden; display: grid; place-items: center; padding: 22px; background: linear-gradient(rgba(33, 9, 16, .72), rgba(33, 9, 16, .9)), url("https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&w=1600&q=82") center/cover; }
.login-panel { width: 460px; max-width: calc(100vw - 28px); min-width: 0; }
.login-card { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; padding: clamp(28px, 6vw, 42px); background: rgba(252, 250, 246, .96); border: 1px solid rgba(226, 200, 140, .45); border-radius: var(--radius-lg); box-shadow: 0 30px 90px rgba(0, 0, 0, .3); }
.login-card form, .login-card label, .login-card .form-control { width: 100%; max-width: 100%; min-width: 0; }
.login-brand { display: grid; justify-items: center; gap: 6px; color: var(--gold-600); font-size: 11px; text-transform: uppercase; }
.login-brand img { width: 180px; height: 132px; object-fit: contain; }
.login-card h1 { margin: 22px 0 6px; overflow-wrap: anywhere; text-align: center; font-size: clamp(30px, 9vw, 36px); }
.login-intro { margin: 0 0 24px; color: var(--text-secondary); text-align: center; font-size: 13px; }

@media (max-width: 1280px) {
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid.compact { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
    .wine-number-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
    .mobile-header { position: sticky; top: 0; z-index: 1030; height: 64px; padding: 8px 16px; display: flex; align-items: center; gap: 10px; color: #fff; background: var(--wine-900); box-shadow: var(--shadow-sm); }
    .mobile-header .icon-button { color: #fff; background: rgba(255, 255, 255, .08); }
    .mobile-header img { width: 48px; height: 46px; object-fit: contain; }
    .mobile-header span { font-family: "Cormorant Garamond", Georgia, serif; font-size: 21px; font-weight: 700; }
    .app-shell { position: static; z-index: auto; display: block; min-height: calc(100vh - 64px); }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 88vw); height: 100vh; transform: translateX(-105%); transition: transform 240ms ease; }
    .sidebar-close { position: absolute; top: 12px; right: 12px; display: grid; color: #fff; background: rgba(255, 255, 255, .08); }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 1035; width: 100%; height: 100%; border: 0; background: rgba(24, 8, 13, .55); opacity: 0; pointer-events: none; display: block; transition: opacity 240ms ease; }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
    .main { max-width: none; min-height: calc(100vh - 64px); padding: 24px clamp(18px, 4vw, 34px) 42px; }
    .topbar { min-height: auto; }
    .wine-number-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .podium-card { min-height: 380px; }
    .podium-card.place-1 { min-height: 420px; }
}

@media (max-width: 767px) {
    body { font-size: 14px; }
    .main { padding: 20px 16px 36px; }
    .system-footer { padding-top: 24px; flex-direction: column; gap: 3px; font-size: 11px; }
    .system-footer--portal { padding: 0 12px calc(20px + env(safe-area-inset-bottom)); }
    .system-footer-separator-between { display: none; }
    .system-footer--portal .system-footer-version-long { display: none; }
    .system-footer--portal .system-footer-version-short { display: inline; }
    .topbar { display: none; }
    .page-title, .panel-head, .confraria-head, .hero-band, .section-summary { align-items: flex-start; flex-direction: column; }
    .page-title { margin-bottom: 18px; }
    .page-title .btn, .hero-band > .btn { width: 100%; }
    .hero-band { min-height: 270px; padding: 25px 21px; }
    .hero-band h2 { font-size: 39px; }
    .metric-grid, .metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
    .metric { min-height: 136px; padding: 15px; }
    .metric-icon { margin-bottom: 13px; }
    .metric-grid.compact .metric:last-child { grid-column: 1 / -1; }
    .grid-cards, .form-grid, .split { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .panel { padding: 18px; }
    .panel-head { margin-bottom: 16px; }
    .confraria-head { min-height: 260px; }
    .confraria-quick-header { align-items: flex-start; flex-direction: column; padding: 17px; }
    .confraria-quick-info h2 { font-size: 26px; }
    .confraria-quick-info p { display: grid; gap: 3px; }
    .confraria-quick-info p span { display: none; }
    .confraria-status-control, .confraria-status-control form, .confraria-status-control .btn { width: 100%; }
    .reveal-head { flex-direction: column; }
    .reveal-head dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reveal-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .reveal-card-preview { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
    .reveal-photo { width: 110px; height: 166px; }
    .reveal-card-preview > .status, .reveal-card-state { grid-column: 2; justify-items: start; }
    .reveal-form { grid-template-columns: 1fr; }
    .reveal-form .full { grid-column: auto; }
    .reveal-form-actions .btn { width: 100%; }
    .confraria-head .actions, .confraria-head .actions .btn, .confraria-head .actions form { width: 100%; }
    .tabbar { margin-inline: -2px; padding: 5px; }
    .wine-number-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .number-card { padding: 13px; }
    .wine-card-head { grid-template-columns: 54px 1fr; }
    .wine-thumb { width: 54px; height: 72px; }
    .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .score-row { padding: 11px; }
    .evaluation-accordion-item > summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 13px; }
    .evaluation-status { grid-column: 2; grid-row: 2; }
    .evaluation-chevron { grid-column: 3; grid-row: 1 / span 2; }
    .evaluation-accordion-body { padding: 10px 13px 13px; }
    .evaluation-record { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; }
    .evaluation-record-score { grid-column: 1; }
    .evaluation-record-status { grid-column: 2; grid-row: 1 / span 2; }
    .evaluation-record .btn { grid-column: 1; width: fit-content; }
    .evaluation-sheet { grid-column: 1 / -1; }
    .evaluation-sheet dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .podium { grid-template-columns: 1fr; align-items: stretch; margin-top: 22px; }
    .podium-card, .podium-card.place-1 { min-height: 0; padding: 24px 18px; }
    .podium-card.place-1 { order: 1; }
    .podium-card.place-2 { order: 2; }
    .podium-card.place-3 { order: 3; }
    .actions .btn { flex: 1 1 auto; }
    .toast-stack { top: 12px; right: 16px; }
    .portal-header { min-height: 66px; padding: 10px 16px; flex-wrap: wrap; align-content: center; column-gap: 12px; row-gap: 10px; }
    .portal-brand { order: 1; }
    .portal-user { order: 2; margin-left: auto; }
    .portal-nav { order: 3; width: 100%; margin-left: 0; padding-top: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; border-top: 1px solid rgba(226,200,140,.18); }
    .portal-nav a { min-width: 0; min-height: 50px; justify-content: center; padding: 8px 6px; gap: 6px; text-align: center; font-size: 11px; line-height: 1.25; }
    .portal-nav a i { flex: 0 0 auto; font-size: 13px; }
    .portal-nav a span { min-width: 0; overflow-wrap: normal; }
    .portal-nav a.portal-nav-search { background: var(--gold-300); border-color: var(--gold-300); }
    .portal-brand img { width: 47px; height: 45px; }
    .portal-brand strong { font-size: 19px; }
    .portal-user > span { display: none; }
    .portal-main { width: min(100% - 28px, 1120px); padding-top: 28px; }
    .portal-section-head { align-items: flex-start; flex-direction: column; margin-top: 25px; }
    .portal-event-meta { display: grid; gap: 5px; }
    .portal-event-meta > span { display: block !important; }
    .portal-event-meta > span + span::before { content: none; }
    .portal-event-hero p strong { display: inline; margin-top: 0; }
    .portal-event-summary { align-items: flex-start; flex-direction: column; }
    .portal-account-grid { grid-template-columns: 1fr; }
    .portal-event-summary > div, .portal-event-summary > .btn { width: 100%; }
    .portal-result-ready { width: 100%; grid-template-columns: auto minmax(0, 1fr); }
    .portal-result-ready .btn { grid-column: 1 / -1; width: 100%; }
    .portal-confraria-card .btn, .portal-form .btn { min-height: 48px; }
    .result-release-status { align-items: flex-start; flex-direction: column; }
    .result-release-status form, .result-release-status .btn { width: 100%; }
    .official-result-hero .portal-event-meta strong { display: inline; margin-top: 0; }
    .official-podium { grid-template-columns: 1fr; align-items: stretch; margin: 22px 0 30px; }
    .official-place, .official-place.place-1 { min-height: 0; padding: 24px 18px; }
    .official-place.place-1 { order: 1; }
    .official-place.place-2 { order: 2; }
    .official-place.place-3 { order: 3; }
    .official-ranking-list article { grid-template-columns: 42px minmax(0, 1fr); row-gap: 2px; }
    .official-ranking-list b { grid-column: 2; white-space: normal; }
    .official-ranking-list em { grid-column: 2; }
    .official-wine-photo, .official-place.place-1 .official-wine-photo { width: 88px; height: 118px; }
    .official-champion { min-height: 0; padding: 28px 20px; grid-template-columns: 1fr; gap: 26px; }
    .official-champion::after { inset: 10px; }
    .official-champion-photo { width: min(62vw, 220px); }
    .official-champion-copy { justify-items: center; text-align: center; }
    .official-champion h2 { font-size: 40px; }
    .official-champion-meta { width: 100%; text-align: left; }
    .official-champion-score { justify-content: center; }
    .official-runner-ups { grid-template-columns: 1fr; }
    .official-runner { min-height: 150px; }
    .official-ranking-list article { grid-template-columns: 38px 48px minmax(0, 1fr); row-gap: 3px; }
    .official-ranking-list article > b { grid-column: 3; }
    .official-ranking-list article > em { grid-column: 3; }
    .official-ranking-thumb { width: 42px; height: 70px; }
    .portal-score-table { display: none; }
    .portal-score-cards { display: block; }
    .tasting-success { align-items: flex-start; flex-wrap: wrap; }
    .tasting-success .btn { width: 100%; margin-left: 0; }
    .wine-picker-grid { grid-template-columns: repeat(3, 1fr); }
    .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .score-choice-grid { gap: 6px; }
    .tasting-total { bottom: 8px; padding: 11px 12px; }
    .tasting-total strong { font-size: 33px; }
    .tasting-total .btn { min-height: 46px; padding: 8px 11px; font-size: 12px; }
    .detail-sheet dl { grid-template-columns: 1fr; }
    .live-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .live-columns { grid-template-columns: 1fr; }
    .live-head { min-height: 0; }
    .live-head .live-update-status { width: 100%; justify-content: center; }
    .live-recent-item { grid-template-columns: auto 1fr auto; }
    .live-recent-item .btn, .live-no-detail { grid-column: 2 / -1; justify-self: start; }
    .admin-detail-grid { grid-template-columns: 1fr; }
}

/* Final mobile layer: kept last so legacy responsive rules cannot compress the admin UI. */
@media (max-width: 767px) {
    .main { min-height: calc(100vh - 62px); padding: 18px 14px 34px; }
    .panel { margin-bottom: 16px; padding: 16px; border-radius: 8px; }
    .page-title, .panel-head { gap: 12px; }
    .page-title .actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .page-title .actions > * { min-width: 0; width: 100%; }
    .form-control, .form-select { min-height: 48px; font-size: 16px; }

    .evaluator-directory { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .evaluator-toolbar { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
    .evaluator-global-list { gap: 12px; }
    .evaluator-global-card { gap: 0; overflow: hidden; padding: 0; border: 1px solid var(--line); border-top: 3px solid var(--gold-500); border-radius: 8px; background: #fffdf9; box-shadow: 0 8px 24px rgba(60, 20, 30, .07); }
    .evaluator-global-card:last-child { border-bottom: 1px solid var(--line); }
    .evaluator-global-identity { padding: 15px 14px 13px; }
    .evaluator-global-facts { gap: 0; padding: 0; background: #fbf7f1; }
    .evaluator-global-facts div { min-height: 67px; padding: 11px 13px; }
    .evaluator-participation-summary { padding: 13px 14px; }
    .evaluator-global-actions { gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #fffaf4; }

    .catalog-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .catalog-metrics article { min-height: 88px; padding: 10px; align-items: flex-start; flex-direction: column; gap: 7px; }
    .catalog-card { display: grid; grid-template-columns: clamp(104px, 32vw, 132px) minmax(0, 1fr); grid-template-rows: auto auto; min-height: 190px; }
    .catalog-card-image { grid-column: 1; grid-row: 1; width: 100%; height: 166px; aspect-ratio: auto; padding: 8px; border-right: 1px solid var(--line); border-bottom: 0; }
    .catalog-card-copy { grid-column: 2; grid-row: 1; min-height: 166px; padding: 14px 13px 12px; }
    .catalog-card footer { grid-column: 1 / -1; grid-row: 2; }

    .dashboard-table-wrap { display: none; }
    .dashboard-mobile-events { display: grid; }
    .dashboard-recent { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .dashboard-recent .panel-head { min-height: 0; margin-bottom: 12px; padding: 0; border: 0; }
}

@media (max-width: 380px) {
    .main { padding-inline: 11px; }
    .page-title .actions { grid-template-columns: 1fr; }
    .catalog-card { grid-template-columns: 96px minmax(0, 1fr); }
    .catalog-card-image, .catalog-card-copy { min-height: 158px; height: 158px; }
}

/* Portal catalog photos mirror the complete-bottle framing used in Admin. */
.portal-wine-photo {
    position: relative;
    padding: 8px;
    background: #f7f1e8;
}
.portal-wine-photo img {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

@media (min-width: 760px) {
    .portal-wine-card { align-items: center; }
    .portal-wine-photo { height: 100%; }
    .portal-wine-photo-is-champion { height: 182px; align-self: center; }
}

@media (max-width: 759px) {
    .portal-wine-card { grid-template-columns: clamp(104px, 32vw, 10px) minmax(0, 1fr); }
    .portal-wine-photo { width: 92px; }
    .portal-wine-card:not(.portal-wine-card-is-champion) { align-items: center; }
    .portal-wine-card:not(.portal-wine-card-is-champion) .portal-wine-photo { align-self: center; }
    .portal-wine-card-is-champion { grid-template-columns: clamp(118px, 35vw, 146px) minmax(0, 1fr); }
    .portal-wine-card.is-champion.portal-wine-card-is-champion { align-items: center; }
    .portal-wine-photo-is-champion { height: clamp(250px, 48vw, 210px); align-self: center; }
}

@media (max-width: 380px) {
    .portal-wine-card { grid-template-columns: 96px minmax(0, 1fr); }
    .portal-wine-card-is-champion { grid-template-columns: 112px minmax(0, 1fr); }
}

/* Portal login: dedicated premium entry experience. */
.portal-login-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(115deg, rgba(33, 9, 16, .92), rgba(43, 13, 22, .7)),
        url("https://images.unsplash.com/photo-1506377247377-2a5b3b417ebb?auto=format&fit=crop&w=1800&q=84") center/cover fixed;
}
.portal-login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .16), transparent 45%, rgba(198, 161, 91, .08));
}
.portal-login-page .portal-header { display: none; }
.portal-login-page .portal-main {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100% - 48px));
    max-width: none;
    padding: clamp(34px, 6vh, 72px) 0 30px;
    display: grid;
    place-items: center;
}
.portal-login-page .portal-alert { width: min(960px, 100%); margin-bottom: 14px; }
.portal-login-shell {
    width: 100%;
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(330px, .86fr) minmax(420px, 1.14fr);
    overflow: hidden;
    border: 1px solid rgba(226, 200, 140, .5);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: 0 32px 90px rgba(15, 4, 8, .38);
}
.portal-login-brand-panel {
    position: relative;
    min-width: 0;
    padding: 46px 38px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(43, 13, 22, .78), rgba(33, 9, 16, .97)),
        url("https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&w=900&q=82") center/cover;
}
.portal-login-brand-panel::after {
    content: "";
    position: absolute;
    inset: 16px;
    pointer-events: none;
    border: 1px solid rgba(226, 200, 140, .24);
}
.portal-login-logo {
    position: relative;
    z-index: 1;
    width: min(250px, 100%);
    height: 190px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .2));
}
.portal-login-brand-copy { position: relative; z-index: 1; }
.portal-login-brand-copy .eyebrow { color: var(--gold-300); }
.portal-login-brand-copy h1 { margin: 7px 0 12px; color: #fff; font-size: 42px; }
.portal-login-brand-copy p { max-width: 300px; margin: 0; color: rgba(255, 255, 255, .72); font-size: 13px; }
.portal-login-signature {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    padding-top: 17px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, .68);
    border-top: 1px solid rgba(226, 200, 140, .2);
    font-size: 11px;
    font-weight: 600;
}
.portal-login-signature i { color: var(--gold-300); font-size: 14px; }
.portal-login-form-panel {
    min-width: 0;
    padding: clamp(42px, 6vw, 66px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fffdf9;
}
.portal-login-heading { margin-bottom: 28px; }
.portal-login-heading h2 { margin: 5px 0 8px; font-size: 40px; }
.portal-login-heading p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.portal-login-form { gap: 17px; }
.portal-login-form label { gap: 7px; }
.portal-login-form label > span:first-child { font-size: 12px; }
.portal-login-field { position: relative; display: block; }
.portal-login-field > i {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    color: var(--gold-600);
    font-size: 16px;
    transform: translateY(-50%);
}
.portal-login-field .form-control {
    min-height: 54px;
    padding-right: 48px;
    padding-left: 44px;
    background: #fff;
    border-color: #d8c8b7;
    font-size: 15px;
}
.portal-pin-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 6px;
    transform: translateY(-50%);
}
.portal-pin-toggle:hover { color: var(--wine-700); background: #f8f1e8; }
.portal-login-submit {
    min-height: 52px;
    margin-top: 4px !important;
    padding-inline: 18px;
    justify-content: space-between;
    box-shadow: 0 10px 22px rgba(84, 20, 38, .2);
}
.portal-login-register {
    margin-top: 25px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}
.portal-login-register > span { color: var(--text-secondary); }
.portal-login-register a { display: inline-flex; align-items: center; gap: 6px; color: var(--wine-700); font-weight: 750; }
.portal-login-register a i { transition: transform var(--transition); }
.portal-login-register a:hover i { transform: translateX(3px); }
.portal-login-page .system-footer--portal { position: relative; z-index: 1; padding-top: 0; color: rgba(255, 255, 255, .62); }

@media (max-width: 780px) {
    .portal-login-page { margin: 0; background-attachment: scroll; }
    .portal-login-page .portal-main { width: min(100% - 28px, 520px); padding: 14px 0 24px; }
    .portal-login-shell { min-height: 0; grid-template-columns: 1fr; }
    .portal-login-brand-panel { min-height: 246px; padding: 25px 24px 22px; text-align: center; }
    .portal-login-brand-panel::after { inset: 9px; }
    .portal-login-logo { width: 170px; height: 124px; margin-bottom: 5px; }
    .portal-login-brand-copy .eyebrow, .portal-login-brand-copy p, .portal-login-signature { display: none; }
    .portal-login-brand-copy h1 { margin: 0; font-size: 31px; }
    .portal-login-form-panel { padding: 27px 24px 25px; }
    .portal-login-heading { margin-bottom: 22px; text-align: center; }
    .portal-login-heading h2 { font-size: 33px; }
    .portal-login-heading p { font-size: 12px; }
    .portal-login-register { align-items: center; flex-direction: column; gap: 6px; text-align: center; }
    .portal-login-page .system-footer--portal { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
    .portal-login-page .portal-main { width: calc(100% - 20px); padding-top: 10px; }
    .portal-login-brand-panel { min-height: 216px; padding: 20px; }
    .portal-login-logo { width: 150px; height: 108px; }
    .portal-login-brand-copy h1 { font-size: 28px; }
    .portal-login-form-panel { padding: 24px 19px 22px; }
    .portal-login-heading h2 { font-size: 30px; }
    .portal-login-field .form-control { min-height: 52px; }
}

@media (max-width: 430px) {
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric strong { font-size: 25px; }
    .metric span:not(.metric-icon) { min-height: 39px; }
    .wine-number-grid { grid-template-columns: 1fr; }
    .score-grid { grid-template-columns: 1fr 1fr; }
    .actions { align-items: stretch; }
    .actions .btn { width: 100%; }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .btn { width: 100%; }
    .login-body { padding: 14px; }
    .login-card { padding: 26px 22px; }
    .login-brand img { width: 154px; height: 112px; }
    .official-result-hero { padding: 25px 19px; }
    .official-result-hero h1 { font-size: 37px; }
    .official-result-notice { align-items: flex-start; }
    .portal-main { width: calc(100% - 20px); max-width: calc(100% - 20px); padding-top: 20px; padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
    .portal-header { padding-top: calc(10px + env(safe-area-inset-top)); }
    .portal-brand { gap: 7px; }
    .portal-brand img { width: 42px; height: 41px; }
    .portal-brand strong { font-size: 17px; }
    .portal-user .btn { min-width: 48px; min-height: 44px; padding-inline: 10px; }
    .portal-user { gap: 7px; }
    .portal-account-link { min-height: 44px; padding-inline: 9px; }
    .portal-header-avatar { width: 38px; height: 38px; font-size: 13px; }
    .portal-welcome { padding: 24px 20px; }
    .portal-welcome h1 { font-size: 37px; }
    .portal-confraria-card { padding: 20px; }
    .portal-confraria-card h2 { margin-block: 15px; }
    .portal-event-summary { padding: 18px; }
    .portal-result-private { align-items: flex-start; }
    .official-champion { margin-top: 20px; }
    .official-champion h2 { font-size: 36px; }
    .official-champion-score strong { font-size: 46px; }
    .official-runner { padding: 17px; grid-template-columns: 62px minmax(0, 1fr); gap: 13px; }
    .official-runner-photo { width: 62px; height: 166px; }
    .official-runner h3 { font-size: 22px; }
    .official-ranking-list article { margin-inline: 0; padding: 12px 0; }
    .official-ranking-list article.is-own-ranking { margin-inline: -5px; padding-inline: 7px; }
    .wine-picker { padding: 18px 14px; }
    .wine-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .wine-choice { min-height: 88px; }
    .choice-card, .choice-card span { min-height: 50px; }
    .score-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .score-choice-grid label { min-height: 52px; }
    .tasting-section { padding: 20px 16px; }
    .tasting-total { bottom: calc(8px + env(safe-area-inset-bottom)); padding: 11px; gap: 10px; }
    .tasting-total .btn { min-height: 48px; }
    .tasting-complete { padding: 34px 20px; }
    .reveal-head dl, .reveal-progress { grid-template-columns: 1fr 1fr; }
    .reveal-progress > div:nth-child(3) { grid-column: 1 / -1; }
    .reveal-card-preview { align-items: start; }
    .reveal-card-copy h3 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Gestão global de avaliadores */
.evaluator-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.evaluator-stats article { position: relative; min-height: 112px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .82); box-shadow: var(--shadow-sm); }
.evaluator-stats span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.evaluator-stats strong { display: block; margin-top: 8px; color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 34px; line-height: 1; }
.evaluator-stats i { position: absolute; right: 18px; bottom: 16px; color: var(--gold-500); font-size: 25px; }
.evaluator-directory { padding: 0; overflow: hidden; }
.evaluator-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) 210px auto auto; gap: 12px; align-items: end; padding: 20px; border-bottom: 1px solid var(--line); background: #fffaf3; }
.evaluator-toolbar label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; top: 50%; left: 14px; z-index: 1; color: var(--muted); transform: translateY(-50%); }
.input-with-icon .form-control { padding-left: 39px; }
.evaluator-global-list { display: grid; }
.evaluator-global-card { display: grid; grid-template-columns: minmax(250px, 1.25fr) minmax(350px, 1.5fr) minmax(210px, .8fr); gap: 18px 24px; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); }
.evaluator-global-card:last-child { border-bottom: 0; }
.evaluator-global-identity { display: flex; gap: 13px; align-items: center; min-width: 0; }
.evaluator-global-identity > span, .evaluator-global-identity > img { display: grid; flex: 0 0 52px; width: 52px; height: 52px; place-items: center; border: 1px solid #e8d2d3; border-radius: 50%; background: #f8eaeb; color: var(--wine-800); font-weight: 800; object-fit: cover; }
.evaluator-global-identity h3 { margin: 0; overflow-wrap: anywhere; font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 15px; font-weight: 750; }
.evaluator-global-identity p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.evaluator-global-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.evaluator-global-facts div { min-width: 0; }
.evaluator-global-facts small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.evaluator-global-facts strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.evaluator-status-pending { border-color: #ead7aa; background: #fff8e5; color: #805c0a; }
.evaluator-status-inactive { border-color: #ddd8d2; background: #f2f0ed; color: #6d6862; }
.evaluator-participation-summary { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.evaluator-participation-summary > i { grid-row: 1 / span 2; color: var(--gold-600); font-size: 20px; }
.evaluator-participation-summary strong, .evaluator-participation-summary small { display: block; }
.evaluator-participation-summary strong { font-size: 13px; }
.evaluator-participation-summary small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.evaluator-participation-summary details { grid-column: 2; margin-top: 5px; color: var(--wine-700); font-size: 11px; }
.evaluator-participation-summary summary { cursor: pointer; font-weight: 700; }
.evaluator-participation-summary ul { margin: 6px 0 0; padding-left: 17px; color: var(--muted); }
.evaluator-global-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.evaluator-global-actions form { margin: 0; }
.evaluator-security-panel, .evaluator-history-panel { margin-top: 18px; }
.evaluator-history-numbers { display: flex; flex-wrap: wrap; gap: 12px; }
.evaluator-history-numbers span { padding: 14px 18px; border: 1px solid var(--line); border-radius: 7px; background: #fffaf3; color: var(--muted); }
.evaluator-history-numbers strong { margin-right: 4px; color: var(--wine-800); font-size: 20px; }
.confirm-message { white-space: pre-line; }
.inline-empty { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fffaf3; }
.inline-empty > i { color: var(--gold-600); font-size: 24px; }
.inline-empty > span { flex: 1; }
.inline-empty strong { display: block; }
.section-description { margin: -3px 0 18px; color: var(--muted); }

@media (max-width: 1180px) {
    .evaluator-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .evaluator-global-card { grid-template-columns: minmax(230px, 1fr) minmax(330px, 1.4fr); }
    .evaluator-participation-summary { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
    .evaluator-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .evaluator-stats article { min-height: 96px; padding: 16px; }
    .evaluator-stats strong { font-size: 29px; }
    .evaluator-toolbar { grid-template-columns: 1fr; }
    .evaluator-toolbar .btn { width: 100%; min-height: 46px; }
    .evaluator-global-card { grid-template-columns: 1fr; padding: 18px; }
    .evaluator-global-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .evaluator-participation-summary { grid-column: auto; }
    .evaluator-global-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .evaluator-global-actions form, .evaluator-global-actions .btn { width: 100%; }
    .inline-empty { align-items: flex-start; flex-wrap: wrap; }
    .inline-empty .btn { width: 100%; }
}
/* Catálogo global: consulta editorial de rótulos sem expor dados de responsáveis. */
.catalog-heading { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.catalog-heading p { max-width: 680px; margin: .35rem 0 0; color: var(--text-secondary); }
.catalog-heading .page-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 10px; }
.catalog-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.catalog-metrics article { display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.7); box-shadow: var(--shadow-sm); }
.catalog-metrics article > i, .catalog-metrics .catalog-wine-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; color: var(--gold-600); background: var(--cream-100); border-radius: 50%; font-size: 20px; }
.catalog-metrics .catalog-wine-icon { padding: 10px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.catalog-metrics strong, .catalog-metrics span { display: block; }
.catalog-metrics strong { color: var(--wine-900); font-family: "Inter", sans-serif; font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.catalog-metrics span { margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.catalog-filters { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(130px, .8fr)) auto; gap: 10px; align-items: center; margin-bottom: 20px; padding: 14px; }
.catalog-search { position: relative; }
.catalog-search > i { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: var(--text-secondary); }
.catalog-search .form-control { padding-left: 36px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.catalog-results { min-height: 160px; transition: opacity .16s ease; }
.catalog-results.is-loading { opacity: .48; pointer-events: none; }
.catalog-card { display: flex; flex-direction: column; min-width: 0; height: 100%; overflow: hidden; color: var(--text-primary); text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: #fffdf9; box-shadow: 0 5px 18px rgba(60,20,30,.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.catalog-card:hover { color: var(--text-primary); transform: translateY(-3px); border-color: var(--gold-300); box-shadow: 0 14px 30px rgba(60,20,30,.11); }
.catalog-card:focus-visible { outline-offset: 4px; }
.catalog-card-image { position: relative; display: grid; place-items: center; width: 100%; height: auto; aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; padding: 12px; background: #f6f0e7; border-bottom: 1px solid var(--line); }
.catalog-card-image img, .catalog-detail-image img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.catalog-card-placeholder, .catalog-empty-icon { fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.catalog-card-placeholder { width: 64px; height: 64px; color: var(--gold-600); }
.catalog-empty-icon { width: 56px; height: 56px; color: var(--gold-600); }
.catalog-card-copy { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 15px; background: #fffdf9; }
.catalog-card h3 { margin: 0 0 13px; overflow-wrap: anywhere; color: var(--wine-900); font-size: 25px; line-height: 1.04; }
.catalog-card-facts { display: grid; gap: 7px; margin-bottom: 16px; color: var(--text-secondary); font-size: 12px; }
.catalog-card-facts span { display: flex; align-items: flex-start; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.catalog-card-facts i { flex: 0 0 14px; margin-top: 1px; color: var(--gold-600); }
.catalog-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.catalog-card-link { display: inline-flex; align-items: center; gap: 5px; color: var(--wine-600); font-size: 11px; font-weight: 700; white-space: nowrap; }
.catalog-card:hover .catalog-card-link i { transform: translateX(2px); }
.catalog-card-link i { transition: transform .18s ease; }
.catalog-classification { display: inline-flex; padding: 4px 8px; color: var(--wine-800); border: 1px solid var(--line); border-radius: 99px; background: var(--cream-50); font-size: 11px; font-weight: 700; }
.catalog-card footer { display: flex; gap: 7px; align-items: flex-start; min-height: 42px; padding: 12px 18px; color: var(--text-secondary); background: #faf6f0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.35; }
.catalog-card footer i { margin-top: 1px; color: var(--gold-600); }
.catalog-empty { padding: 42px 20px; }
.catalog-form { max-width: 980px; padding: 24px; }
.form-section-title { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.form-section-title span { color: var(--wine-900); font-family: 'Cormorant Garamond', serif; font-size: 25px; font-weight: 700; }
.form-section-title small { color: var(--text-secondary); }
.catalog-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.catalog-form label { position: relative; display: grid; gap: 6px; color: var(--wine-900); font-size: 13px; font-weight: 700; }
.catalog-form .field-wide { grid-column: 1 / -1; }
.catalog-history-input { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.catalog-form > .form-actions { margin-top: 18px; display: flex; align-items: center; }
.catalog-suggestions { position: absolute; z-index: 3; top: calc(100% + 3px); left: 0; right: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fffdf9; box-shadow: var(--shadow-md); }
.catalog-suggestion-item { display: block; padding: 9px 11px; color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.catalog-suggestion-item + .catalog-suggestion-item { border-top: 1px solid var(--line); }
.catalog-detail { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; align-items: center; padding: 26px; }
.catalog-detail-image { display: grid; place-items: center; width: 220px; height: 260px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fbf4e5; }
.catalog-detail dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; margin: 0; }
.catalog-detail dl div { min-width: 0; }
.catalog-detail-notes { grid-column: 1 / -1; }
.catalog-detail dt { margin-bottom: 4px; color: var(--text-secondary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.catalog-detail dd { margin: 0; overflow-wrap: anywhere; color: var(--wine-900); font-size: 15px; font-weight: 600; }
.catalog-history { min-width: 0; margin-top: 20px; padding: 22px; overflow: hidden; }
.catalog-history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.catalog-history-head h3 { margin: 2px 0 0; }
.catalog-history-head > span { color: var(--text-secondary); font-size: 12px; }
.catalog-history .table-responsive { width: 100%; overflow-x: auto; }
.catalog-history-table { width: 100%; min-width: 650px; table-layout: auto; }
.catalog-history-table th, .catalog-history-table td { vertical-align: middle; white-space: nowrap; }
.catalog-history-table th:first-child, .catalog-history-table td:first-child { width: 38%; white-space: normal; }
.catalog-wine-number { display: inline-flex; padding: 4px 8px; color: var(--wine-800); background: #f8f1e8; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 700; }
@media (max-width: 1450px) { .catalog-filters { grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 1fr)); } }
@media (max-width: 900px) { .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .catalog-search, .catalog-filters .btn { grid-column: 1 / -1; } }
@media (max-width: 720px) { .catalog-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; } .catalog-heading .btn, .page-actions { width: 100%; } .page-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .catalog-metrics { grid-template-columns: 1fr; gap: 9px; } .catalog-metrics article { min-height: 66px; } .catalog-filters { grid-template-columns: 1fr; padding: 12px; } .catalog-search { grid-column: auto; } .catalog-filters .btn { width: 100%; } .catalog-grid { grid-template-columns: 1fr; } .catalog-card-image { aspect-ratio: 16 / 10; } .catalog-form { padding: 18px; } .catalog-form-grid { grid-template-columns: 1fr; } .catalog-detail { grid-template-columns: 1fr; gap: 20px; padding: 18px; } .catalog-detail-image { width: 100%; height: 230px; } .catalog-detail dl { grid-template-columns: 1fr 1fr; gap: 15px; } .catalog-history { padding: 16px; } .catalog-history-head { align-items: flex-start; } .catalog-history .table-responsive { overflow: visible; border: 0; } .catalog-history-table { min-width: 0; } .catalog-history-table thead { display: none; } .catalog-history-table tbody, .catalog-history-table tr, .catalog-history-table td { display: block; width: 100%; } .catalog-history-table tr { padding: 6px 0; border: 1px solid var(--line); border-radius: 7px; background: #fffdf9; } .catalog-history-table tr + tr { margin-top: 10px; } .catalog-history-table td, .catalog-history-table td:first-child { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 9px 12px; white-space: normal; text-align: right; border: 0; } .catalog-history-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--text-secondary); font-size: 10px; font-weight: 700; text-transform: uppercase; text-align: left; } }

.wine-photo-field { display: grid; gap: 9px; }
.wine-photo-input { display: grid; gap: 6px; }
.wine-photo-hint { margin: 0; color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.wine-photo-error { margin: 0; color: #9d2933; font-size: 12px; font-weight: 600; }
.wine-photo-panel { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf9; }
.wine-photo-thumb { display: grid; place-items: center; flex: 0 0 92px; width: 92px; height: 108px; margin: 0; padding: 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background-color: #fff; background-image: linear-gradient(45deg, #ece5da 25%, transparent 25%), linear-gradient(-45deg, #ece5da 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ece5da 75%), linear-gradient(-45deg, transparent 75%, #ece5da 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }
.wine-photo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wine-photo-thumb.is-avatar { flex: 0 0 110px; width: 110px; height: 110px; margin: 0 auto; padding: 0; overflow: hidden; border: 3px solid var(--gold-300); border-radius: 50%; background-image: none; box-shadow: 0 6px 16px rgba(169, 132, 66, .2); }
.wine-photo-thumb.is-avatar img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: center; }
.wine-photo-field.is-avatar-photo .wine-photo-panel { flex-direction: column; align-items: center; gap: 10px; padding: 18px; text-align: center; }
.wine-photo-field.is-avatar-photo .wine-photo-panel > strong[data-photo-status] { color: var(--gold-700); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.wine-photo-field.is-avatar-photo .wine-photo-meta { justify-items: center; text-align: center; }
.wine-photo-field.is-avatar-photo .wine-photo-buttons { justify-content: center; }
.wine-photo-meta { display: grid; gap: 4px; min-width: 0; }
.wine-photo-meta strong { color: var(--wine-900); font-size: 13px; }
.wine-photo-meta span { color: var(--text-secondary); font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.wine-photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.photo-editor-modal .modal-content { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fffdf9; box-shadow: var(--shadow-raised); }
.photo-editor-modal .modal-header { align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.photo-editor-modal .modal-title { margin: 0; color: var(--wine-900); font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 700; }
.photo-editor-modal .modal-body { padding: 16px 20px; }
.photo-editor-modal .modal-footer { flex-wrap: nowrap; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); }
.photo-editor-spacer { flex: 1 1 auto; }
.photo-editor-stage { width: 100%; height: min(52vh, 420px); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f6f0e7; }
.photo-editor-stage img { display: block; max-width: 100%; }
.photo-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.photo-editor-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.photo-editor-modes { display: inline-flex; align-items: center; margin-right: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.photo-editor-modes .btn { min-height: 34px; border: 0; border-radius: 5px; box-shadow: none; }
.photo-editor-modes .btn + .btn { border-left: 1px solid var(--line); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.photo-editor-modes .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.photo-editor-modes .btn.active { color: #fff; background: var(--wine-700); }
.photo-editor-modes .btn:focus-visible { position: relative; z-index: 1; }
.photo-editor-modal .photo-editor-range { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text-secondary); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.photo-editor-range input[type="range"] { width: 118px; accent-color: var(--wine-700); }
.photo-editor-note { min-height: 17px; margin: 11px 0 0; color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.photo-editor-modal .cropper-view-box, .photo-editor-modal .cropper-face { outline-color: var(--gold-500); }
.photo-editor-modal.is-busy .modal-body { opacity: .65; pointer-events: none; }
@media (max-width: 720px) { .wine-photo-panel { flex-direction: column; align-items: flex-start; } .photo-editor-toolbar { justify-content: flex-start; } .photo-editor-group { width: 100%; } .photo-editor-modes { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-right: 0; } .photo-editor-modes .btn { min-width: 0; white-space: normal; } .photo-editor-modal .modal-footer { flex-wrap: wrap; } .photo-editor-spacer { display: none; } }

@media (max-width: 370px) {
    .portal-account-link { width: 44px; justify-content: center; padding: 0; }
    .portal-account-link span { display: none; }
}

@media (max-width: 1100px) {
    .dashboard-overview { grid-template-columns: 1fr; }
    .dashboard-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dashboard-highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
}

@media (max-width: 767px) {
    .dashboard-hero { min-height: 245px; }
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-highlight-grid { grid-template-columns: 1fr; }
    .dashboard-kpi { min-height: 124px; padding: 15px; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; }
    .dashboard-kpi .metric-icon { width: 36px; height: 36px; }
    .dashboard-kpi > strong { font-size: 29px; }
    .dashboard-recent .panel-head { padding: 18px; align-items: stretch; }
    .dashboard-recent .panel-head .btn { width: 100%; justify-content: center; }
    .dashboard-table-wrap { overflow: visible; }
    .dashboard-table, .dashboard-table tbody { display: block; width: 100%; }
    .dashboard-table thead { display: none; }
    .dashboard-table tbody { padding: 12px; display: grid; gap: 12px; }
    .dashboard-table tbody tr { padding: 8px 12px; display: block; overflow: hidden; background: #fffdf9; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); }
    .dashboard-table tbody td { min-height: 38px; padding: 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; text-align: right; background: transparent; border-bottom: 1px solid var(--line); }
    .dashboard-table tbody td::before { content: attr(data-label); flex: 0 0 auto; color: var(--text-secondary); font-size: 9px; font-weight: 800; text-transform: uppercase; text-align: left; }
    .dashboard-table tbody td:last-child { padding-top: 12px; display: block; border-bottom: 0; }
    .dashboard-table tbody td:last-child::before { display: block; margin-bottom: 8px; }
    .dashboard-latest-row td:first-child { box-shadow: none; }
    .dashboard-latest-row { border-top: 3px solid var(--gold-500) !important; }
    .dashboard-table .table-actions { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); white-space: normal; }
    .dashboard-table .table-actions .btn, .dashboard-table .table-actions form, .dashboard-table .table-actions form .btn { width: 100%; }
    .dashboard-table .table-actions form { grid-column: 1 / -1; }
    .dashboard-table .table-actions .btn-outline-danger span { display: inline; }
}

/* Cascade lock for the redesigned administrative mobile components. */
@media (max-width: 767px) {
    .main { min-height: calc(100vh - 62px); padding: 18px 14px 34px; }
    .panel { margin-bottom: 16px; padding: 16px; border-radius: 8px; }
    .page-title, .panel-head { gap: 12px; }
    .page-title .actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .page-title .actions > * { min-width: 0; width: 100%; }
    .form-control, .form-select { min-height: 48px; font-size: 16px; }

    .evaluator-directory { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .evaluator-toolbar { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
    .evaluator-global-list { gap: 12px; }
    .evaluator-global-card { gap: 0; overflow: hidden; padding: 0; border: 1px solid var(--line); border-top: 3px solid var(--gold-500); border-radius: 8px; background: #fffdf9; box-shadow: 0 8px 24px rgba(60, 20, 30, .07); }
    .evaluator-global-card:last-child { border-bottom: 1px solid var(--line); }
    .evaluator-global-identity { padding: 15px 14px 13px; }
    .evaluator-global-facts { gap: 0; padding: 0; background: #fbf7f1; }
    .evaluator-global-facts div { min-height: 67px; padding: 11px 13px; }
    .evaluator-participation-summary { padding: 13px 14px; }
    .evaluator-global-actions { gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #fffaf4; }

    .catalog-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .catalog-metrics article { min-height: 88px; padding: 10px; align-items: flex-start; flex-direction: column; gap: 7px; }
    .catalog-card { display: grid; grid-template-columns: clamp(104px, 32vw, 132px) minmax(0, 1fr); grid-template-rows: auto auto; min-height: 190px; }
    .catalog-card-image { grid-column: 1; grid-row: 1; width: 100%; height: 166px; aspect-ratio: auto; padding: 8px; border-right: 1px solid var(--line); border-bottom: 0; }
    .catalog-card-copy { grid-column: 2; grid-row: 1; min-height: 166px; padding: 14px 13px 12px; }
    .catalog-card footer { grid-column: 1 / -1; grid-row: 2; }

    .dashboard-table-wrap { display: none; }
    .dashboard-mobile-events { display: grid; }
    .dashboard-recent { overflow: visible; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .dashboard-recent .panel-head { min-height: 0; margin-bottom: 12px; padding: 0; border: 0; }
    .dashboard-recent .panel-head .btn { width: auto; align-self: flex-start; }
}

@media (max-width: 380px) {
    .main { padding-inline: 11px; }
    .page-title .actions { grid-template-columns: 1fr; }
    .catalog-card { grid-template-columns: 96px minmax(0, 1fr); }
    .catalog-card-image, .catalog-card-copy { min-height: 158px; height: 158px; }
}

/* Relatórios */
.report-section { scroll-margin-top: 18px; margin-bottom: 34px; }
.report-tabbar { position: sticky; top: 0; z-index: 5; }
.report-filters { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) auto auto; align-items: end; gap: 12px; margin-bottom: 28px; }
.report-filters label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.report-overview-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-champions-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.report-champion-card { display: grid; gap: 6px; text-align: center; justify-items: center; }
.report-champion-photo { width: 96px; height: 100%; margin-bottom: 6px; display: grid; place-items: center; color: var(--gold-500); background: var(--cream-100); border: 1px solid var(--line); border-radius: 8px; font-size: 34px; overflow: hidden; }
.report-champion-photo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.report-champion-card h3 { margin: 2px 0; font-size: 21px; }
.report-champion-score { margin: 4px 0 2px; color: var(--wine-800); font-weight: 700; }
.report-subsection-head { margin-top: 8px; }
.report-subsection-head h4 { margin: 0; color: var(--wine-900); font-family: "Cormorant Garamond", Georgia, serif; font-size: 21px; }
.report-table td .flag-icon { margin-right: 6px; }

@media (max-width: 1180px) {
    .report-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filters button, .report-filters a.btn { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
    .report-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filters { grid-template-columns: 1fr; }
    .report-table, .report-table tbody { display: block; width: 100%; }
    .report-table thead { display: none; }
    .report-table tbody { display: grid; gap: 12px; }
    .report-table tbody tr { display: block; padding: 8px 12px; background: #fffdf9; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); }
    .report-table tbody td { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 38px; padding: 8px 0; text-align: right; background: transparent; border-bottom: 1px solid var(--line); }
    .report-table tbody td:last-child { border-bottom: 0; }
    .report-table tbody td::before { content: attr(data-label); flex: 0 0 auto; color: var(--text-secondary); font-size: 9px; font-weight: 800; text-transform: uppercase; text-align: left; }
}
