/* Auto-gerado a partir de modules/. Nao editar manualmente. */

/* === _admin-layout.css === */
/* ============ LAYOUT GERAL (PAINEL) ============ */
.layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 18px 12px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    transition: transform .25s ease;
    z-index: 1000;
}
.sidebar .logo {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px 22px;
    min-height: 56px;
}
.sidebar .logo .logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--accent-primary);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.sidebar .logo .logo-text {
    font-weight: 700; font-size: 14px;
    color: var(--text-primary);
    line-height: 1.2;
}
.sidebar .logo img { max-height: 40px; }

.nav-section {
    padding: 14px 12px 4px;
    font-size: 10.5px; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: .08em; font-weight: 600;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: var(--text-secondary); font-size: 13.5px; font-weight: 500;
    transition: background .12s, color .12s;
    text-decoration: none; cursor: pointer;
    background: transparent; border: none; width: 100%; text-align: left;
    position: relative;
}
.nav-item:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); text-decoration: none; }
[data-theme="dark"] .nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active {
    background: rgba(89, 163, 35, 0.1);
    color: var(--accent-primary); font-weight: 600;
}
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .badge-count {
    margin-left: auto;
    background: var(--accent-danger);
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

/* Main content */
.main {
    flex: 1;
    margin-left: 240px;
    min-width: 0;
    display: flex; flex-direction: column;
    min-height: 100vh;
}
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 50;
}
.topbar h1 {
    font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 8px;
    background: rgba(0,0,0,0.04);
}
[data-theme="dark"] .topbar .user-chip { background: rgba(255,255,255,0.05); }
.user-chip .avatar {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--accent-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.user-chip .meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip .name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-chip .role { font-size: 11px; color: var(--text-muted); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }
.dropdown-toggle .caret {
    width: 12px; height: 12px; margin-left: 4px;
    color: var(--text-muted);
    transition: transform .15s;
}
.dropdown.open .dropdown-toggle .caret { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.dropdown.open .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu .dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 13.5px;
    text-decoration: none;
    cursor: pointer;
    background: transparent; border: none;
    width: 100%; text-align: left;
    font-family: inherit;
}
.dropdown-menu .dropdown-item:hover { background: rgba(0,0,0,0.04); text-decoration: none; }
[data-theme="dark"] .dropdown-menu .dropdown-item:hover { background: rgba(255,255,255,0.06); }
.dropdown-menu .dropdown-item.danger { color: var(--accent-danger); }
.dropdown-menu .dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}
.dropdown-menu form { margin: 0; }

.icon-btn {
    width: 36px; height: 36px; border-radius: 8px;
    background: transparent; border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary);
    position: relative;
}
.icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }
.icon-btn .bubble {
    position: absolute; top: 2px; right: 2px;
    background: var(--accent-danger); color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

.sidebar-toggle {
    display: none;
    width: 36px; height: 36px; border-radius: 8px;
    background: transparent; border: 1px solid var(--border-color);
    align-items: center; justify-content: center; cursor: pointer;
}
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 999;
}

/* Page content */
.page {
    padding: 22px 22px 60px;
    flex: 1;
    width: 100%;
    max-width: 100%;
}



/* === _auth.css === */
/* ============ AUTH PAGES ============ */
.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #d8efbe 0%, #ecf8d6 50%, #f4fbe6 100%);
}
[data-theme="dark"] .auth-wrap {
    background: linear-gradient(135deg, #15301a 0%, #1f4023 100%);
}
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 32px;
}
.auth-card .auth-logo {
    display: flex; align-items: center; gap: 10px;
    justify-content: center; margin-bottom: 18px;
}
.auth-card .auth-logo .icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 22px; font-size: 13px; }
.auth-card .switch-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }



/* === _base.css === */
/* =========================================================
   Fidelidade Animal Care - Estilos principais
   Tema claro/escuro + cor primaria customizavel
   Mobile-first, sem dependencias externas
   ========================================================= */

:root {
    --bg-primary: #f6f7fb;
    --bg-secondary: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #94a3b8;
    --accent-primary: #59a323;
    --accent-secondary: #7dc94a;
    --accent-primary-hover: #4a8a1d;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --accent-info: #3b82f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-sidebar: #111827;
    --bg-input: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.55;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }



/* === _components.css === */
/* ============ HEADINGS / CARDS ============ */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.page-head h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 0; }
.page-head p { color: var(--text-secondary); margin: 2px 0 0; font-size: 13px; }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
}
.card + .card { margin-top: 16px; }
.form-grid-2 > .card + .card,
.form-grid-3 > .card + .card { margin-top: 0; }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }

.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.stat-card .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.stat-card .delta { font-size: 12px; color: var(--accent-success); }
.stat-card.accent { background: var(--accent-primary); color: #fff; border: none; }
.stat-card.accent .label, .stat-card.accent .value, .stat-card.accent .delta { color: #fff; }

/* ============ FORMULARIOS ============ */
.form-row { display: grid; gap: 14px; }
.form-grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.form-grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
    .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.form-group small { color: var(--text-muted); font-size: 12px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="date"],
input[type="search"], input[type="url"], input[type="color"],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(89, 163, 35, 0.18);
}
textarea { min-height: 100px; resize: vertical; }
input[type="file"] {
    padding: 8px;
    background: var(--bg-input);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    width: 100%;
}
.form-actions {
    display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--accent-primary); color: #fff;
    font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background .12s, transform .04s, box-shadow .12s;
}
.btn:hover { background: var(--accent-primary-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] {
    background: #d1d5db !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    opacity: 1;
}
.btn:disabled:hover, .btn[disabled]:hover {
    background: #d1d5db !important;
    color: #6b7280 !important;
    transform: none;
}
[data-theme="dark"] .btn:disabled,
[data-theme="dark"] .btn[disabled] {
    background: #374151 !important;
    color: #6b7280 !important;
    border-color: #374151 !important;
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: rgba(0,0,0,0.03); }
.btn-danger { background: var(--accent-danger); }
.btn-success { background: var(--accent-success); }
.btn-warning { background: var(--accent-warning); }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-color); }

/* Alertas */
.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    border-left: 4px solid;
}
.alert-success { background: #ecfdf5; color: #065f46; border-color: #10b981; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #3b82f6; }
[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.1); color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { background: rgba(239,68,68,0.1); color: #fca5a5; }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,0.1); color: #fcd34d; }
[data-theme="dark"] .alert-info    { background: rgba(59,130,246,0.1); color: #93c5fd; }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    background: rgba(0,0,0,0.06); color: var(--text-secondary);
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-primary { background: rgba(89,163,35,0.15); color: var(--accent-primary); }
.badge-muted   { background: rgba(0,0,0,0.06); color: var(--text-secondary); }



/* === _hero.css === */
/* ============ HERO/SUCCESS LAYOUT (checkout-sucesso, resgate-show) ============ */
.success-wrap {
    max-width: 720px;
    margin: 32px auto;
    display: flex; flex-direction: column;
    gap: 18px;
}
.success-hero {
    position: relative;
    text-align: center;
    padding: 28px 20px 14px;
    overflow: hidden;
}
.success-check {
    position: relative;
    width: 88px; height: 88px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    display: inline-flex; align-items: center; justify-content: center;
    animation: success-pop .5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes success-pop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.success-check .circle-anim {
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
    animation: success-draw .6s ease-out .2s forwards;
}
.success-check .check-anim {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: success-draw .35s ease-out .6s forwards;
}
@keyframes success-draw { to { stroke-dashoffset: 0; } }

.success-title {
    font-size: 28px; font-weight: 800; margin: 4px 0 6px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.success-subtitle {
    font-size: 15px; color: var(--text-secondary); margin: 0;
}

.success-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .success-stats { grid-template-columns: repeat(3, 1fr); }
}
.success-stat {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}
.stat-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.success-stat .stat-label {
    font-size: 12px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.success-stat .stat-value {
    font-size: 16px; font-weight: 700; color: var(--text-primary); margin-top: 2px;
}

.success-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
}
.success-card-title {
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    color: var(--text-secondary); letter-spacing: .04em;
    margin: 0 0 14px;
}

.success-timeline {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column;
    gap: 14px;
    position: relative;
}
.success-timeline::before {
    content: '';
    position: absolute;
    left: 9px; top: 6px; bottom: 6px;
    width: 2px; background: var(--border-color);
    z-index: 0;
}
.success-timeline li {
    display: flex; gap: 14px; position: relative;
    align-items: flex-start;
}
.success-timeline .dot {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    z-index: 1; margin-top: 1px;
    position: relative;
}
.success-timeline li.done .dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-position: center; background-repeat: no-repeat;
}
.success-timeline li.active .dot {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(89,163,35,0.18);
    animation: success-pulse 1.5s ease-in-out infinite;
}
@keyframes success-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(89,163,35,0.18); }
    50%      { box-shadow: 0 0 0 8px rgba(89,163,35,0.08); }
}
.success-timeline li > div {
    display: flex; flex-direction: column; line-height: 1.4;
}
.success-timeline li > div strong { font-size: 14px; color: var(--text-primary); }
.success-timeline li > div .text-muted { font-size: 13px; }

.success-items {
    display: grid; gap: 10px;
    grid-template-columns: 1fr;
}
@media (min-width: 500px) {
    .success-items { grid-template-columns: repeat(2, 1fr); }
}
.success-item {
    display: flex; gap: 10px; align-items: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(0,0,0,0.015);
}
.success-item-img {
    width: 52px; height: 52px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    overflow: hidden; flex-shrink: 0;
}
.success-item-img img { width: 100%; height: 100%; object-fit: cover; }
.success-item-info { min-width: 0; }
.success-item-title {
    font-size: 13.5px; font-weight: 600; color: var(--text-primary);
    line-height: 1.3; overflow: hidden; text-overflow: ellipsis;
}
.success-item-more {
    grid-column: 1 / -1;
    text-align: center; color: var(--text-muted); font-size: 13px;
    padding: 4px 0;
}

.success-actions {
    display: flex; gap: 10px; justify-content: center;
    flex-wrap: wrap; margin-top: 6px;
}
.success-actions .btn { min-width: 200px; }
@media (max-width: 480px) {
    .success-actions .btn { width: 100%; }
}

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* Scrollbar bonita */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }



/* === _media.css === */
/* ============ MEDIA FIELD (Upload + Biblioteca + Drag/Drop) ============ */
.media-field-actions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.media-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    background: rgba(0,0,0,0.02);
    transition: border-color .15s, background .15s;
    cursor: pointer;
    min-height: 140px;
    display: flex; align-items: center; justify-content: center;
}
.media-dropzone:hover, .media-dropzone:focus {
    border-color: var(--accent-primary);
    background: rgba(89,163,35,0.05);
    outline: none;
}
.media-dropzone.drag-over {
    border-color: var(--accent-primary);
    background: rgba(89,163,35,0.10);
    border-style: solid;
}
.media-dropzone-empty {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    color: var(--text-muted);
}
.media-dropzone-empty p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.media-dropzone-empty small { font-size: 12px; }
.media-dropzone-preview {
    display: flex; align-items: center; justify-content: center;
    max-height: 280px; overflow: hidden;
}
.media-dropzone-preview img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 6px;
}
[data-theme="dark"] .media-dropzone { background: rgba(255,255,255,0.03); }

/* ============ MODAL DA BIBLIOTECA ============ */
.media-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: fadeIn .15s ease;
}
.media-modal-overlay[hidden] { display: none; }
.media-modal {
    background: var(--bg-secondary);
    border-radius: 14px;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    animation: slideUp .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.media-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}
.media-modal-header h3 {
    margin: 0; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.media-modal-toolbar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
}
.media-search {
    flex: 1; min-width: 200px;
    display: flex; align-items: center; gap: 8px;
    padding: 0 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.media-search input {
    flex: 1; border: none; background: transparent;
    padding: 8px 0; font-size: 14px; outline: none;
    color: var(--text-primary);
}
.media-search svg { color: var(--text-muted); }
.media-modal-body {
    padding: 18px; overflow-y: auto;
    flex: 1; min-height: 280px;
}
.media-loading {
    text-align: center; color: var(--text-muted); padding: 30px;
}
.media-empty {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.media-empty p { font-weight: 600; margin: 10px 0 4px; color: var(--text-secondary); }
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.media-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: #f3f4f6;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, transform .04s;
}
.media-item:hover { border-color: var(--border-color); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item.selected { border-color: var(--accent-primary); transform: scale(0.98); }
.media-item.selected::after {
    content: ''; position: absolute; top: 6px; right: 6px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-position: center; background-repeat: no-repeat;
}
.media-item-delete {
    position: absolute; top: 6px; left: 6px;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff; border: none;
    cursor: pointer;
    display: none; align-items: center; justify-content: center;
}
.media-item:hover .media-item-delete { display: inline-flex; }
.media-item-delete:hover { background: var(--accent-danger); }
.media-pagination {
    display: flex; justify-content: center; gap: 6px; margin-top: 14px;
}
.media-pagination button {
    min-width: 32px; height: 32px;
    border-radius: 6px; border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-secondary);
    cursor: pointer; font-size: 13px;
}
.media-pagination button.current {
    background: var(--accent-primary); color: #fff; border-color: var(--accent-primary);
}
.media-pagination button:disabled { opacity: .45; cursor: default; }
.media-modal-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 18px;
    border-top: 1px solid var(--border-color);
}
.media-selected-info { font-size: 12.5px; color: var(--text-muted); }



/* === _mobile.css === */
/* ============ MOBILE ============ */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-toggle { display: inline-flex; }
    .main { margin-left: 0; }
}

@media (max-width: 720px) {
    .page { padding: 16px 14px 60px; }
    .topbar { padding: 10px 14px; }
    .topbar .user-chip .meta { display: none; }

    /* Tabela -> cards */
    .table-wrap { display: none; }
    .cards-mobile { display: flex; }
    .store-header-inner { gap: 10px; }
    .store-search { order: 3; flex-basis: 100%; }
    .store-actions { flex: 1; justify-content: flex-end; }
    .store-wallet .label { display: none; }
    .cart-item { grid-template-columns: 60px 1fr; }
    .cart-item .qty { grid-column: 1 / -1; }
    .cart-item .thumb { width: 60px; height: 60px; }
    .auth-card { padding: 22px; }
}



/* === _store.css === */
/* ============ LOJA ============ */
.store-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 90;
    box-shadow: var(--shadow-sm);
}
.store-header-inner {
    max-width: 1280px; margin: 0 auto;
    padding: 12px 18px;
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap;
}
.store-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; color: var(--text-primary); font-size: 16px;
    text-decoration: none;
}
.store-logo .icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--accent-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.store-search {
    flex: 1 1 280px; display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}
.store-search input {
    flex: 1; border: none; padding: 10px 16px; background: transparent; outline: none;
    font-size: 14px;
}
.store-search button {
    border: none; background: var(--accent-primary); color: #fff;
    padding: 0 18px; cursor: pointer;
}
.store-search button:hover { background: var(--accent-primary-hover); }
.store-actions { display: flex; align-items: center; gap: 8px; }
.store-wallet {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
    color: var(--accent-primary);
    font-weight: 700; font-size: 13px;
    text-decoration: none;
    transition: background .15s, transform .05s;
}
.store-wallet:hover { background: color-mix(in srgb, var(--accent-primary) 22%, transparent); text-decoration: none; }
.store-wallet:active { transform: translateY(1px); }
.store-wallet .label { display: inline-flex; align-items: baseline; gap: 3px; line-height: 1; }
.store-wallet .wallet-unit { font-size: 11px; font-weight: 600; opacity: 0.85; }
.store-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 8px;
    color: var(--text-secondary); text-decoration: none; font-size: 13.5px;
    border: 1px solid transparent;
}
.store-link:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); text-decoration: none; }

.cart-link { position: relative; }
.cart-link .cart-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--accent-danger); color: #fff;
    border-radius: 999px; padding: 1px 6px; font-size: 11px; font-weight: 700;
}

/* ===== Header da loja no mobile =====
   Acoes ficam icon-only (texto escondido), barra de busca ocupa a linha toda. */
@media (max-width: 720px) {
    .store-header-inner {
        padding: 10px 14px;
        gap: 10px;
    }
    .store-logo { font-size: 14px; gap: 8px; }
    .store-logo span { display: none; }      /* nome textual ao lado do logo some */
    .store-logo .icon { width: 32px; height: 32px; }
    .store-logo img { max-height: 30px !important; }

    .store-actions { gap: 4px; margin-left: auto; }

    /* Icones-only: esconde a label e o padding lateral */
    .store-actions .store-link .label { display: none; }
    .store-actions .store-link {
        padding: 8px;
        border-radius: 10px;
    }
    .store-actions .store-link[style*="background"] {
        /* Botoes coloridos (Entrar) mantem padding um pouco maior */
        padding: 8px 10px;
    }

    /* Wallet compacto - sempre visivel mostrando os pontos */
    .store-wallet {
        padding: 6px 12px; font-size: 12.5px; gap: 5px;
        flex-shrink: 0;
    }
    .store-wallet .label { display: inline-flex !important; }

    /* Barra de busca ocupa a linha toda */
    .store-search {
        order: 99;
        flex: 1 1 100%;
    }
    .store-search input { padding: 9px 14px; font-size: 13.5px; }
    .store-search button { padding: 0 14px; }
}

@media (max-width: 380px) {
    /* Em telas bem pequenas, encolhe ainda mais o wallet e esconde "pts" */
    .store-wallet { padding: 5px 9px; font-size: 11.5px; gap: 4px; }
    .store-wallet svg { width: 13px; height: 13px; }
    .store-wallet .wallet-unit { display: none; }
}

.store-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 18px;
}
@media (max-width: 1024px) {
    .store-container { padding: 30px 30px; }
}
@media (max-width: 640px) {
    .store-container { padding: 30px 15px; }
}

/* Hero da loja (slider full-width fora do container) */
.store-hero {
    width: 100%;
    background: var(--bg-secondary);
}
.slider {
    position: relative; overflow: hidden;
    width: 100%;
    background: var(--bg-secondary);
}
.slider .slides {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 650;
}
@media (max-width: 720px) {
    /* Proporcao 450x300 = 3:2 quando o banner mobile dedicado e usado */
    .slider .slides { aspect-ratio: 450 / 300; }
}
.slider .slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity .8s ease;
}
.slider .slide.active { opacity: 1; }
.slider .slide a,
.slider .slide picture { display: block; width: 100%; height: 100%; }
.slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.slider .dots {
    position: absolute; bottom: 18px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 10px;
    z-index: 2;
}
.slider .dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.55); border: none; cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: background .15s, transform .15s;
    padding: 0;
}
.slider .dot:hover { background: rgba(255,255,255,0.85); }
.slider .dot.active { background: #fff; transform: scale(1.15); }

/* Produtos */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 18px 0 12px;
    gap: 12px;
}
.section-title h2 { font-size: 18px; font-weight: 700; }
@media (max-width: 640px) {
    .section-title { margin: 12px 0 10px; }
    .section-title h2 { font-size: 16px; }
    .carousel-btn { width: 30px; height: 30px; }
    .carousel-btn svg { width: 14px; height: 14px; }
}

/* Carrossel horizontal com scroll-snap + setas */
.carousel-nav { display: flex; gap: 6px; }
.carousel-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .12s, color .12s, border-color .12s, opacity .12s;
}
.carousel-btn:hover { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }
.carousel-btn:disabled { opacity: .35; cursor: default; background: var(--bg-secondary); color: var(--text-secondary); border-color: var(--border-color); }
.carousel {
    position: relative;
    --carousel-gap: 16px;
}
.carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item {
    flex: 0 0 calc((100% - var(--carousel-gap) * 4) / 5); /* 5 itens desktop, 4 gaps */
    scroll-snap-align: start;
    min-width: 0;
}
.carousel-item .product-card { width: 100%; }

@media (max-width: 1024px) {
    .carousel-item { flex-basis: calc((100% - var(--carousel-gap)) / 2); } /* 2 itens, 1 gap */
}
@media (max-width: 640px) {
    /* No mobile: 2 itens por visualizacao com card mais compacto */
    .carousel-item { flex-basis: calc((100% - var(--carousel-gap)) / 2); }
    .carousel-item .product-card .product-title { font-size: 12.5px; min-height: 32px; }
    .carousel-item .product-card .product-pts   { font-size: 13px; }
    .carousel-item .product-card .product-price { font-size: 11.5px; }
    .carousel-item .product-card .product-badge { font-size: 9px; padding: 2px 6px; top: 6px; left: 6px; }
    .carousel-item .product-card .product-body  { padding: 10px; gap: 4px; }
}
@media (max-width: 380px) {
    /* Em telas bem pequenas: 1.5 itens (peek no proximo) */
    .carousel-item { flex-basis: 68%; }
}

.products-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .12s, box-shadow .12s;
    text-decoration: none; color: inherit;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.product-image {
    width: 100%; aspect-ratio: 1 / 1;
    background: #f3f4f6;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    overflow: hidden;
    position: relative;
}
.product-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-title { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.3; min-height: 36px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; flex-wrap: wrap; }
.product-pts { font-weight: 700; color: var(--accent-primary); font-size: 14px; }
.product-price { color: var(--text-secondary); font-size: 13px; }
.product-card .btn { margin: 0 12px 12px; }

/* ===== Layout em lista para a grade de produtos no mobile =====
   Mantem o carousel de destaques (.carousel-item .product-card) intacto. */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .products-grid .product-card {
        flex-direction: row;
        align-items: stretch;
    }
    .products-grid .product-card .product-image {
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        aspect-ratio: 1 / 1;
        height: auto;
        flex-shrink: 0;
    }
    .products-grid .product-card .product-body {
        padding: 10px 12px;
        justify-content: center;
        gap: 8px;
        min-width: 0;
    }
    .products-grid .product-card .product-title {
        font-size: 13.5px;
        min-height: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .products-grid .product-card .product-meta {
        margin-top: 0;
        flex-wrap: wrap;
        gap: 6px;
    }
    .products-grid .product-card .product-pts   { font-size: 13.5px; }
    .products-grid .product-card .product-price { font-size: 12.5px; }
    .products-grid .product-card .product-badge {
        font-size: 9px;
        padding: 2px 6px;
        top: 6px; left: 6px;
    }
}

/* Produto detalhe */
.product-detail {
    display: grid; gap: 22px;
    grid-template-columns: 1fr;
}
@media (min-width: 760px) {
    .product-detail { grid-template-columns: 1fr 1fr; }
}
.product-detail .image-box {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
}
.product-detail .info-box {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 22px;
}
.product-desc p { margin: 0 0 8px; }
.product-desc ul, .product-desc ol { margin: 6px 0 10px; padding-left: 22px; }
.product-desc li { margin-bottom: 2px; }
.product-detail h1 { font-size: 22px; margin-bottom: 8px; }
.price-row {
    display: flex; gap: 12px; align-items: baseline;
    margin: 14px 0;
}
.price-row .pts { font-size: 24px; font-weight: 800; color: var(--accent-primary); }
.price-row .or  { color: var(--text-muted); }
.price-row .money { font-size: 18px; font-weight: 700; color: var(--text-primary); }

/* Rich text editor (descricao de produtos, etc) */
.rich-editor {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    overflow: hidden;
}
.rich-editor:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(89,163,35,0.18);
}
.rich-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.03);
    flex-wrap: wrap;
}
[data-theme="dark"] .rich-toolbar { background: rgba(255,255,255,0.04); }
.rich-tool {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background .12s, color .12s, border-color .12s;
}
.rich-tool:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.rich-tool.active {
    background: rgba(89,163,35,0.12);
    color: var(--accent-primary);
    border-color: rgba(89,163,35,0.3);
}
.rich-tool svg { width: 14px; height: 14px; }
.rich-divider {
    width: 1px;
    background: var(--border-color);
    margin: 2px 4px;
}
.rich-content {
    padding: 10px 12px;
    min-height: 120px;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.55;
    font-family: inherit;
    background: var(--bg-input);
}
.rich-content:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    pointer-events: none;
}
.rich-content p { margin: 0 0 8px; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content ul, .rich-content ol { margin: 6px 0 8px; padding-left: 22px; }
.rich-content li { margin-bottom: 2px; }

/* Quantity stepper (− [N] +) */
.qty-buy-row {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
}
.qty-stepper {
    display: inline-flex; align-items: center;
    gap: 4px;
    border: none;
    border-radius: 999px;
    background: transparent;
    padding: 0;
    height: 52px;
}
.qty-btn {
    width: 70px; height: 38px;
    border: none;
    background: rgba(0,0,0,0.04);
    color: var(--text-primary);
    border-radius: 999px;
    cursor: pointer;
    font-size: 18px; font-weight: 700; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .12s, color .12s, transform .04s;
    user-select: none;
    padding: 0;
}
[data-theme="dark"] .qty-btn { background: rgba(255,255,255,0.06); }
.qty-btn:hover {
    color: #fff;
    background: var(--accent-primary);
}
.qty-btn:active { transform: scale(0.94); }
.qty-btn:disabled { opacity: .35; cursor: default; }
.qty-btn:disabled:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
[data-theme="dark"] .qty-btn:disabled:hover { background: rgba(255,255,255,0.06); }
.qty-input {
    width: 48px;
    height: 100%;
    text-align: center;
    border: none;
    border-radius: 0;
    font-size: 15px; font-weight: 700;
    -moz-appearance: textfield;
    background: transparent;
    color: var(--text-primary);
    padding: 0;
}
.qty-input:focus { outline: none; }
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.qty-add { flex: 1; min-width: 200px; }

/* Filtros loja */
.filters-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 14px;
    display: grid; gap: 10px;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) {
    .filters-bar { grid-template-columns: 2fr 1fr 1fr 1fr auto; align-items: end; }
}

/* Carrinho */
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px; align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.cart-item .thumb {
    width: 80px; height: 80px; border-radius: 8px;
    background: #f3f4f6; overflow: hidden;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .info .title { font-weight: 600; }
.cart-item .info .pts { color: var(--accent-primary); font-weight: 600; font-size: 13px; }
.cart-item .info .price { color: var(--text-secondary); font-size: 13px; }
.cart-item .qty {
    display: flex; align-items: center; gap: 6px;
}
.cart-item .qty input {
    width: 64px; text-align: center;
}
.cart-item .remove-btn {
    background: transparent; border: none; color: var(--accent-danger);
    cursor: pointer; padding: 4px 8px;
}

.cart-summary {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 18px;
    position: sticky; top: 90px;
}
.cart-summary .row {
    display: flex; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px dashed var(--border-color);
}
.cart-summary .row:last-child { border-bottom: none; font-weight: 700; }

/* Slider / banner placeholder */
.banner-placeholder {
    background: var(--gradient-primary);
    color: #fff; text-align: center;
    padding: 60px 24px; border-radius: 16px;
}
.banner-placeholder h2 { font-size: 24px; margin-bottom: 8px; }

/* Footer */
.store-footer {
    margin-top: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
}
.store-footer::before {
    /* faixa decorativa no topo do footer */
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--accent-primary),
        color-mix(in srgb, var(--accent-primary) 70%, #fff));
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 18px; }
.footer-cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 36px;
    padding: 48px 0 32px;
}
.footer-brand .footer-logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; color: var(--text-primary); font-size: 16px; text-decoration: none;
    margin-bottom: 14px;
}
.footer-brand .footer-logo .icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--accent-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.footer-tag {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 320px;
    font-size: 13.5px;
}
.footer-col h4 {
    font-size: 11.5px; font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin: 0 0 14px;
    position: relative;
    padding-bottom: 8px;
}
.footer-col h4::after {
    content: '';
    position: absolute; left: 0; bottom: 0;
    width: 24px; height: 2px; border-radius: 2px;
    background: var(--accent-primary);
}
.footer-col ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.footer-col li, .footer-col a {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.4;
}
.footer-col a {
    text-decoration: none;
    transition: color .15s, transform .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-col a:hover { color: var(--accent-primary); transform: translateX(2px); }
.footer-col .contact-item {
    display: inline-flex; align-items: flex-start; gap: 8px;
}
.footer-col .contact-item svg {
    width: 14px; height: 14px; margin-top: 3px;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.footer-col .contact-item a:hover { transform: none; }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 18px 0 22px;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 14px;
    color: var(--text-muted);
    font-size: 12.5px;
}
.footer-bottom strong { color: var(--text-primary); font-weight: 700; }
.footer-bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom-links a {
    color: var(--text-muted); text-decoration: none;
    transition: color .15s;
}
.footer-bottom-links a:hover { color: var(--accent-primary); }

@media (max-width: 900px) {
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px; padding: 40px 0 28px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-cols { grid-template-columns: 1fr; gap: 28px; padding: 32px 0 24px; }
    .footer-bottom { flex-direction: column; text-align: center; align-items: center; gap: 10px; }
    .footer-bottom-links { justify-content: center; }
}

/* Color pickers */
.color-swatch {
    width: 32px; height: 32px; border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
}
.color-swatch.active { border-color: var(--text-primary); transform: scale(1.05); }

/* Switch */
.switch {
    position: relative; display: inline-block;
    width: 44px; height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider-toggle {
    position: absolute; cursor: pointer; inset: 0;
    background: #cbd5e1; border-radius: 999px;
    transition: .2s;
}
.switch .slider-toggle:before {
    position: absolute; content: '';
    height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider-toggle { background: var(--accent-primary); }
.switch input:checked + .slider-toggle:before { transform: translateX(20px); }

/* Tabs */
.tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
    overflow-x: auto;
}
.tab {
    padding: 10px 14px;
    background: transparent; border: none;
    color: var(--text-secondary); cursor: pointer;
    font-size: 13.5px; font-weight: 600;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

/* Image preview */
.image-preview {
    width: 100%; max-width: 200px;
    aspect-ratio: 1 / 1; background: #f3f4f6;
    border-radius: 8px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    margin-top: 8px;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Helpers */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }



/* === _tables.css === */
/* ============ TABELAS RESPONSIVAS ============ */
.table-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}
table.data-table th, table.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
    color: var(--text-primary);
    vertical-align: middle;
}
table.data-table thead th {
    background: rgba(0,0,0,0.02);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
[data-theme="dark"] table.data-table thead th { background: rgba(255,255,255,0.04); }
table.data-table tbody tr:hover { background: rgba(0,0,0,0.015); }
[data-theme="dark"] table.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* Remove border-bottom da ultima linha — o .table-wrap ja tem borda externa */
.table-wrap table.data-table tr:last-child td,
.table-wrap table.data-table tr:last-child th {
    border-bottom: none;
}

.table-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Paginacao */
.pagination-wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px; font-weight: 500;
    transition: background .12s, border-color .12s, color .12s;
}
.pagination a:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); text-decoration: none; }
.pagination .current {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    font-weight: 600;
}
.pagination .disabled {
    opacity: .45; pointer-events: none;
}
.pagination .ellipsis { border: none; background: transparent; }

/* Botoes de acao em formato icone - estilo soft (fundo tingido) */
.icon-action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    border-radius: 8px;
    border: none;
    background: rgba(0,0,0,0.05);
    color: var(--text-secondary);
    cursor: pointer; text-decoration: none;
    transition: background .12s, color .12s, transform .04s;
    flex-shrink: 0;
}
.icon-action:hover { background: rgba(0,0,0,0.08); color: var(--text-primary); text-decoration: none; }
.icon-action:active { transform: translateY(1px); }

.icon-action.primary {
    background: rgba(89,163,35,0.12);
    color: var(--accent-primary);
}
.icon-action.primary:hover { background: rgba(89,163,35,0.22); color: var(--accent-primary); }

.icon-action.info {
    background: rgba(59,130,246,0.12);
    color: var(--accent-info);
}
.icon-action.info:hover { background: rgba(59,130,246,0.22); color: var(--accent-info); }

.icon-action.danger {
    background: rgba(239,68,68,0.12);
    color: var(--accent-danger);
}
.icon-action.danger:hover { background: rgba(239,68,68,0.22); color: var(--accent-danger); }

.icon-action.success {
    background: rgba(16,185,129,0.12);
    color: var(--accent-success);
}
.icon-action.success:hover { background: rgba(16,185,129,0.22); color: var(--accent-success); }

.icon-action.warning {
    background: rgba(245,158,11,0.14);
    color: var(--accent-warning);
}
.icon-action.warning:hover { background: rgba(245,158,11,0.24); color: var(--accent-warning); }

.icon-action svg { width: 16px; height: 16px; display: block; }
.icon-action form { display: inline; margin: 0; }

[data-theme="dark"] .icon-action { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .icon-action:hover { background: rgba(255,255,255,0.12); }

/* Tooltip customizado via data-tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: tooltip-fade .15s ease;
}
[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    pointer-events: none;
    z-index: 1000;
}
@keyframes tooltip-fade {
    from { opacity: 0; transform: translateX(-50%) translateY(2px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Mobile cards (NO horizontal scroll) */
.cards-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
}
.card-row {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
}
.card-row .field {
    display: flex; flex-direction: column;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
}
.card-row .field:last-of-type { border-bottom: none; }
.card-row .field .k {
    font-size: 11px; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: .04em; font-weight: 600;
}
.card-row .field .v { font-size: 14px; color: var(--text-primary); }
.card-row .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }



/* === _utils.css === */
/* ========== Paginator ========== */
.paginator { display:flex; flex-direction:column; gap:10px; margin:18px 0 4px; }
.paginator-info { font-size:13px; color:var(--text-muted,#6b7280); }
.paginator-list { list-style:none; display:flex; flex-wrap:wrap; gap:4px; padding:0; margin:0; }
.paginator-list li a,
.paginator-list li span { display:inline-flex; min-width:36px; height:34px; align-items:center; justify-content:center; padding:0 10px; border:1px solid var(--border,#e5e7eb); border-radius:8px; color:var(--text,#374151); text-decoration:none; font-size:13px; line-height:1; background:var(--card,#fff); transition:background .15s,border-color .15s; }
.paginator-list li a:hover { border-color:var(--primary,#59a323); color:var(--primary,#59a323); }
.paginator-list li.active span { background:var(--primary,#59a323); color:#fff; border-color:var(--primary,#59a323); font-weight:600; }
.paginator-list li.disabled span { color:var(--text-muted,#9ca3af); background:transparent; cursor:not-allowed; }
.paginator-list li.ellipsis span { border:0; background:transparent; color:var(--text-muted,#9ca3af); }
@media (min-width:640px) { .paginator { flex-direction:row; align-items:center; justify-content:space-between; } }

/* ========== Dashboard extras ========== */
.dash-cols { display:grid; grid-template-columns:1fr; gap:16px; margin:0 0 16px; }
@media (min-width:900px)  { .dash-cols { grid-template-columns:1fr 1fr; } }
@media (min-width:1200px) { .dash-cols { grid-template-columns:1fr 1fr 1fr; } }
.dash-cols + .card { margin-top: 16px; }

ul.rank-list, ol.rank-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
    counter-reset: rank;
}
ul.rank-list li, ol.rank-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    counter-increment: rank;
}
ul.rank-list li:last-child, ol.rank-list li:last-child { border-bottom: 0; }
ul.rank-list li::before, ol.rank-list li::before {
    content: counter(rank);
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: var(--accent-primary, #59a323);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.rank-list .rank-nome  { flex: 1; font-size: 14px; color: var(--text-primary, #1f2937); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .rank-valor { font-size: 13px; color: var(--text-muted, #6b7280); font-weight: 600; white-space: nowrap; }

