/* ============================================================
   InStack Hub — Design System
   Paleta: navy #1A4297 · cyan #29ABE2
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --instack-navy: #1A4297;
    --instack-navy-dark: #0f2d6b;
    --instack-cyan: #29ABE2;
    --instack-cyan-light: #5ec4ef;
    --instack-gradient: linear-gradient(135deg, #1A4297 0%, #29ABE2 100%);

    --hub-bg: #f0f4fa;
    --hub-bg-soft: #f8fafc;
    --hub-surface: #ffffff;
    --hub-surface-2: #e8eef8;
    --hub-border: #d4deef;
    --hub-border-strong: #b8c9e8;
    --hub-text: #0f2347;
    --hub-text-secondary: #3d5a80;
    --hub-text-muted: #7a94b8;
    --hub-accent: #29ABE2;
    --hub-accent-hover: #1A4297;
    --hub-accent-light: #e3f4fc;
    --hub-accent-ring: rgba(41, 171, 226, 0.22);
    --hub-purple: #1A4297;
    --hub-radius: 14px;
    --hub-radius-lg: 20px;
    --hub-shadow-sm: 0 1px 3px rgba(26, 66, 151, 0.06), 0 1px 2px rgba(26, 66, 151, 0.04);
    --hub-shadow: 0 4px 24px rgba(26, 66, 151, 0.08);
    --hub-shadow-lg: 0 12px 40px rgba(26, 66, 151, 0.12);
    --hub-sidebar-w: 260px;
    --font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: var(--font);
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
}

body.login-body {
    overflow-x: hidden;
    background: var(--hub-bg);
}

/* ---- Login ---- */
.login-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--hub-bg);
    overflow: hidden;
}
@media (min-width: 900px) {
    .login-page { grid-template-columns: 52% 48%; }
}

/* Painel azul */
.login-hero {
    display: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0f2d6b 0%, #1A4297 38%, #29ABE2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: none;
}
@media (min-width: 900px) {
    .login-hero {
        display: flex;
        align-items: center;
        padding: clamp(2.5rem, 5vh, 3.5rem) clamp(2.5rem, 6vw, 4.5rem);
    }
}

.login-hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.login-hero-decor::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 78%, rgba(255,255,255,0.12) 0%, transparent 40%),
        radial-gradient(circle at 82% 22%, rgba(255,255,255,0.08) 0%, transparent 35%);
}
.login-hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 20%, transparent 75%);
}
.login-hero-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}
.login-hero-orb-1 {
    width: 340px;
    height: 340px;
    right: -60px;
    top: 12%;
}
.login-hero-orb-2 {
    width: 200px;
    height: 200px;
    right: 18%;
    bottom: 8%;
    background: rgba(255, 255, 255, 0.05);
}

.login-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.login-hero-brand {
    margin: 0;
}

.login-hero .login-hero-logo {
    width: auto;
    max-width: 176px;
    height: auto;
    margin: 0;
    border: none;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.15));
}

.login-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-hero h1 {
    font-size: clamp(1.5rem, 2.2vw, 1.75rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.025em;
}

.login-hero .login-hero-desc {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9375rem;
    line-height: 1.75;
    margin: 0;
    max-width: 38ch;
}

.login-hero-features-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 1.35rem 1.5rem;
    backdrop-filter: blur(8px);
}

.login-hero-features-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 1rem;
}

.login-hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-hero-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.login-hero-feature i {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

/* Painel do formulário */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2rem 1.5rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(41, 171, 226, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(26, 66, 151, 0.05) 0%, transparent 45%),
        var(--hub-bg);
}
@media (min-width: 900px) {
    .login-panel { padding: 2.5rem 2rem; }
}

.login-panel-inner {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.login-card {
    width: 100%;
    background: var(--hub-surface);
    border-radius: var(--hub-radius-lg);
    padding: 2.5rem 2rem 2.25rem;
    box-shadow: var(--hub-shadow-lg);
    border: 1px solid var(--hub-border);
}

.login-card-brand {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--hub-border);
}

.login-card-brand img {
    height: auto;
    width: auto;
    max-width: 152px;
    margin: 0 auto;
    display: block;
    border: none;
}

.login-card-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-card-head h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--hub-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.login-card-head .subtitle {
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    margin: 0.45rem 0 0;
    line-height: 1.5;
}

.login-panel-foot {
    font-size: 0.7rem;
    color: var(--hub-text-muted);
    text-align: center;
    margin: 0;
    letter-spacing: 0.02em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.login-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
    margin-bottom: 0.45rem;
}

.login-field .hub-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
}

.login-card .hub-btn-primary {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
    margin-top: 0.35rem;
    cursor: pointer;
}

.login-card .hub-alert {
    margin-bottom: 1.25rem;
}

@media (max-width: 899px) {
    .login-panel { padding: 2rem 1.25rem; min-height: auto; }
    .login-card { padding: 2rem 1.5rem 1.75rem; }
    .login-card-brand img { max-width: 140px; }
}
/* ---- App shell ---- */
.hub-app {
    background: var(--hub-bg) !important;
    color: var(--hub-text) !important;
    min-height: 100vh;
}

.hub-sidebar {
    width: var(--hub-sidebar-w);
    background: var(--hub-surface) !important;
    border-right: 1px solid var(--hub-border) !important;
    box-shadow: var(--hub-shadow-sm);
    display: flex;
    flex-direction: column;
    z-index: 40;
}
.hub-sidebar-brand {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--hub-border);
}
.hub-sidebar-brand img { height: auto; width: auto; max-width: 200px; max-height: 40px; object-fit: contain; border: none; }
.hub-nav { padding: 1rem 0.75rem; flex: 1; overflow-y: auto; }
.hub-nav-group { margin-bottom: 1.25rem; }
.hub-nav-label {
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--hub-text-muted);
    padding: 0 0.75rem; margin-bottom: 0.5rem;
}
.nav-btn {
    width: 100%; display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.85rem; margin-bottom: 2px;
    font-size: 0.875rem; font-weight: 600;
    color: var(--hub-text-secondary) !important;
    border-radius: 10px;
    border: 1px solid transparent !important;
    background: transparent !important;
    transition: all 0.15s ease;
    cursor: pointer;
    text-align: left;
}
.nav-btn i { width: 20px; text-align: center; font-size: 0.95rem; opacity: 0.85; }
.nav-btn:hover {
    background: var(--hub-surface-2) !important;
    color: var(--instack-navy) !important;
}
.nav-btn.active-nav {
    background: var(--hub-accent-light) !important;
    color: var(--instack-navy) !important;
    border-color: rgba(41, 171, 226, 0.35) !important;
    box-shadow: var(--hub-shadow-sm);
}
.nav-btn.active-nav i { color: var(--instack-cyan) !important; opacity: 1; }

.hub-sidebar-user {
    padding: 1rem;
    border-top: 1px solid var(--hub-border);
    background: linear-gradient(180deg, var(--hub-surface-2), var(--hub-surface));
}
.hub-sidebar-user-inner {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.75rem; border-radius: 12px;
}
.hub-avatar {
    width: 38px; height: 38px; border-radius: 11px;
    background: var(--instack-gradient);
    color: #fff; font-size: 0.75rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.hub-header {
    height: 68px;
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hub-border) !important;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 30;
}
.hub-header-title { font-size: 1.125rem; font-weight: 800; color: var(--hub-text); }
.hub-header-sub { font-size: 0.75rem; color: var(--hub-text-muted); font-weight: 500; }
.hub-search {
    background: var(--hub-surface-2) !important;
    border: 1px solid var(--hub-border) !important;
    color: var(--hub-text) !important;
    border-radius: 999px !important;
    padding: 0.5rem 1rem 0.5rem 2.25rem !important;
    font-size: 0.8125rem !important;
    min-width: 180px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-search:focus {
    outline: none;
    border-color: var(--instack-cyan) !important;
    box-shadow: 0 0 0 3px var(--hub-accent-ring) !important;
}
.hub-search::placeholder { color: var(--hub-text-muted) !important; }
.hub-select {
    background: var(--hub-surface) !important;
    border: 1px solid var(--hub-border-strong) !important;
    color: var(--instack-navy) !important;
    border-radius: 10px !important;
    padding: 0.55rem 2rem 0.55rem 0.85rem !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    appearance: none;
    cursor: pointer;
    box-shadow: var(--hub-shadow-sm);
    min-width: 160px;
}
.hub-select-empresa {
    background: linear-gradient(135deg, #ffffff 0%, #eef4fc 100%) !important;
    border-color: rgba(26, 66, 151, 0.25) !important;
}
.hub-select:focus { outline: none; border-color: var(--instack-cyan) !important; box-shadow: 0 0 0 3px var(--hub-accent-ring) !important; }

.hub-main-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--hub-bg);
}
@media (min-width: 1024px) { .hub-main-scroll { padding: 2rem 2.5rem; } }

/* ---- Components ---- */
.glass-card, .hub-card {
    background: var(--hub-surface) !important;
    border: 1px solid var(--hub-border) !important;
    border-radius: var(--hub-radius) !important;
    box-shadow: var(--hub-shadow-sm) !important;
    backdrop-filter: none !important;
}
.hub-card:hover { box-shadow: var(--hub-shadow) !important; }

.hub-input, .hub-app input[type="text"], .hub-app input[type="email"],
.hub-app input[type="password"], .hub-app input[type="date"],
.hub-app input[type="time"], .hub-app input[type="month"],
.hub-app input[type="number"], .hub-app select, .hub-app textarea {
    background: var(--hub-surface) !important;
    border: 1px solid var(--hub-border) !important;
    border-radius: 10px !important;
    color: var(--hub-text) !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-input:focus, .hub-app input:focus, .hub-app select:focus, .hub-app textarea:focus {
    outline: none !important;
    border-color: var(--instack-cyan) !important;
    box-shadow: 0 0 0 3px var(--hub-accent-ring) !important;
}

.hub-btn-primary {
    background: var(--instack-gradient) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(41, 171, 226, 0.35);
}
.hub-btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 66, 151, 0.25);
}

.hub-btn-ghost {
    background: var(--hub-surface) !important;
    border: 1px solid var(--hub-border) !important;
    color: var(--hub-text-secondary) !important;
    border-radius: 10px;
}
.hub-btn-ghost:hover {
    background: var(--hub-accent-light) !important;
    color: var(--instack-navy) !important;
    border-color: rgba(41, 171, 226, 0.3) !important;
}

.hub-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hub-btn-danger:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.hub-page-title {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--hub-text);
    letter-spacing: -0.03em;
}
.hub-page-desc { color: var(--hub-text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.hub-stat-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    padding: 1.25rem;
    box-shadow: var(--hub-shadow-sm);
}
.hub-stat-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hub-text-muted); }
.hub-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--instack-navy); margin-top: 0.25rem; }

.hub-alert {
    border-radius: 14px;
    padding: 1rem 1.15rem;
    border: 1px solid;
    border-left-width: 4px;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    box-shadow: var(--hub-shadow-sm);
}
.hub-alert-lg { padding: 1.15rem 1.35rem; }
.hub-alert-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}
.hub-alert-body { font-size: 0.8125rem; line-height: 1.5; margin: 0.35rem 0 0; }
.hub-alert-body-muted { font-style: italic; opacity: 0.85; }
.hub-alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}
.hub-alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(26, 66, 151, 0.1);
}
.hub-alert-action {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    background: var(--instack-cyan);
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.hub-alert-action-muted { background: var(--hub-surface-2); color: var(--instack-navy); }
.hub-alert-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    flex-shrink: 0;
}
.hub-alert-info {
    background: linear-gradient(135deg, #e8f6fd 0%, #d4ecfa 100%);
    border-color: rgba(41, 171, 226, 0.45);
    border-left-color: var(--instack-navy);
    color: var(--instack-navy);
}
.hub-alert-info .hub-alert-title { color: var(--instack-navy); }
.hub-alert-icon-info { background: rgba(41, 171, 226, 0.2); color: var(--instack-navy); }
.hub-alert-warn {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fbbf24;
    border-left-color: #d97706;
    color: #92400e;
}
.hub-alert-warn .hub-alert-title { color: #b45309; }
.hub-alert-icon-warn { background: rgba(251, 191, 36, 0.25); color: #b45309; }
.hub-alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    border-left-color: #dc2626;
    color: #991b1b;
}
.hub-alert-danger .hub-alert-title { color: #dc2626; }
.hub-alert-icon-danger { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.hub-alert-orange {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
    border-left-color: #ea580c;
    color: #9a3412;
}
.hub-alert-orange .hub-alert-title { color: #ea580c; }
.hub-alert-icon-orange { background: rgba(249, 115, 22, 0.18); color: #ea580c; }
.hub-alert-item-orange { background: rgba(255, 255, 255, 0.7); border-color: rgba(234, 88, 12, 0.15); }
.hub-alert-badge-orange { background: rgba(249, 115, 22, 0.15); color: #c2410c; }

.hub-dropdown {
    background: var(--hub-surface) !important;
    border: 1px solid var(--hub-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--hub-shadow-lg) !important;
}

/* Accent overrides — map old green to InStack blue */
.hub-app .text-\[\#4ADE80\], .hub-app .text-\[\#4ade80\] { color: var(--instack-cyan) !important; }
.hub-app .bg-\[\#4ADE80\], .hub-app .bg-\[\#4ade80\] { background-color: var(--instack-cyan) !important; }
.hub-app .border-\[\#4ADE80\], .hub-app .border-\[\#4ade80\] { border-color: var(--instack-cyan) !important; }
.hub-app .border-t-\[\#4ADE80\], .hub-app .border-l-\[\#4ADE80\], .hub-app .border-b-\[\#4ADE80\] { border-color: var(--instack-cyan) !important; }
.hub-app .from-\[\#4ADE80\], .hub-app .to-green-500 { --tw-gradient-from: var(--instack-navy) !important; --tw-gradient-to: var(--instack-cyan) !important; }
.hub-app button[class*="from-[#4ADE80]"],
.hub-app button[class*="from-teal"],
.hub-app .bg-gradient-to-r.from-\[\#4ADE80\] {
    background: var(--instack-gradient) !important;
    color: #fff !important;
}
.hub-app .selection\:bg-emerald-200 { --tw-selection-bg: var(--hub-accent-light); }
.hub-app .bg-emerald-500 { background-color: var(--instack-cyan) !important; }

/* Light theme overrides for legacy dark Tailwind */
.hub-app .text-white { color: var(--hub-text) !important; }
.hub-app .text-gray-200, .hub-app .text-gray-300 { color: var(--hub-text-secondary) !important; }
.hub-app .text-gray-400, .hub-app .text-gray-500, .hub-app .text-gray-600 { color: var(--hub-text-muted) !important; }
.hub-app .text-zinc-400, .hub-app .text-zinc-500, .hub-app .text-zinc-600 { color: var(--hub-text-muted) !important; }

.hub-app [class*="bg-[#0"], .hub-app [class*="bg-[#1"], .hub-app [class*="bg-[#2"] {
    background-color: var(--hub-surface) !important;
}
.hub-app .bg-zinc-900, .hub-app .bg-zinc-900\/30, .hub-app .bg-zinc-900\/50,
.hub-app .bg-zinc-800, .hub-app .bg-zinc-800\/80, .hub-app .bg-zinc-800\/40 {
    background-color: var(--hub-surface-2) !important;
}
.hub-app .border-zinc-800, .hub-app .border-zinc-800\/50, .hub-app .border-zinc-800\/80,
.hub-app .border-zinc-700, .hub-app .border-zinc-700\/50, .hub-app .border-zinc-700\/80 {
    border-color: var(--hub-border) !important;
}

.hub-app .nav-btn.active-nav,
.hub-app .bg-zinc-800\/80.text-white {
    background: var(--hub-accent-light) !important;
    color: var(--instack-navy) !important;
}

/* Modals */
.hub-app [id^="modal-"] > div > div:first-child,
.hub-app .fixed.inset-0 > div > .bg-\[\#0a0a0a\] {
    background: var(--hub-surface) !important;
    border-color: var(--hub-border) !important;
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--hub-border-strong); border-radius: 99px; }

/* Social */
.social-post-card {
    border-radius: 16px; overflow: hidden;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    box-shadow: var(--hub-shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.social-post-card:hover { box-shadow: var(--hub-shadow); transform: translateY(-2px); }
.social-post-card.status-aprovado { border-left: 4px solid var(--instack-cyan); }
.social-post-card.status-aguardando { border-left: 4px solid #d97706; }
.social-post-card.status-reprovado, .social-post-card.status-alteracao_solicitada { border-left: 4px solid #dc2626; }
.social-post-card.status-rascunho { border-left: 4px solid var(--hub-border-strong); }
.social-post-card.status-publicado { border-left: 4px solid var(--instack-navy); }
.social-thumb { aspect-ratio: 4/3; background: var(--hub-surface-2); object-fit: cover; }
.social-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.badge-aprovado { background: var(--hub-accent-light); color: var(--instack-navy); }
.badge-aguardando { background: #fef3c7; color: #b45309; }
.badge-reprovado, .badge-alteracao { background: #fee2e2; color: #b91c1c; }
.badge-rascunho { background: var(--hub-surface-2); color: var(--hub-text-muted); }
.badge-publicado { background: #dbeafe; color: var(--instack-navy); }

.portal-card {
    border-radius: var(--hub-radius-lg);
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    box-shadow: var(--hub-shadow);
}

/* ---- Portal público do cliente ---- */
html.portal-html, html.portal-html body {
    margin: 0;
    padding: 0;
    width: 100%;
}
.portal-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--hub-bg);
    margin: 0;
}

/* Login split-screen */
.portal-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .portal-login-page { grid-template-columns: 1fr 1fr; }
}
.portal-login-hero {
    display: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0f2d6b 0%, #1A4297 42%, #29ABE2 100%);
    padding: 3rem 2.5rem;
}
@media (min-width: 900px) {
    .portal-login-hero {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 3.5rem;
    }
}
.portal-login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(255,255,255,0.12) 0%, transparent 42%),
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.08) 0%, transparent 38%);
}
.portal-login-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 400px;
}
.portal-login-hero img {
    max-width: 180px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.15));
}
.portal-login-hero h2 {
    font-size: 1.625rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
    line-height: 1.3;
}
.portal-login-hero p {
    color: rgba(255,255,255,0.88);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0 0 2rem;
}
.portal-login-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.portal-login-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.95);
    font-size: 0.875rem;
    font-weight: 500;
}
.portal-login-feature i {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255,255,255,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}
.portal-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(41, 171, 226, 0.07) 0%, transparent 50%),
        var(--hub-bg);
}
.portal-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    padding: 2.25rem 2rem 2rem;
    box-shadow: var(--hub-shadow-lg);
}
.portal-login-brand-mobile {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--hub-border);
}
@media (min-width: 900px) {
    .portal-login-brand-mobile { display: none; }
}
.portal-login-brand-mobile img {
    max-width: 140px;
    margin: 0 auto 1rem;
    display: block;
}
.portal-login-card h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    text-align: center;
}
.portal-login-card .portal-login-sub {
    font-size: 0.8125rem;
    color: var(--hub-text-muted);
    text-align: center;
    margin: 0.4rem 0 0;
    line-height: 1.5;
}
.portal-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.5rem; }
.portal-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
    margin-bottom: 0.45rem;
}
.portal-field .hub-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
}
.portal-flash {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border: 1px solid;
}
.portal-flash-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.portal-flash-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.portal-flash-warn { background: #fffbeb; border-color: #fecaca; color: #92400e; }

.portal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hub-border);
    box-shadow: var(--hub-shadow-sm);
}
.portal-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.portal-header-minimal .portal-header-inner {
    padding: 0.75rem 1.25rem;
}
.portal-header-logo {
    height: 32px;
    width: auto;
    display: block;
}
.portal-header-logout {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    color: var(--hub-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}
.portal-header-logout:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}
.portal-header-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.portal-header-brand img { max-height: 34px; width: auto; flex-shrink: 0; }
.portal-header-label {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--instack-cyan);
    margin: 0;
}
.portal-header-name {
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0.1rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.portal-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
}
.portal-hero-banner {
    background: linear-gradient(135deg, #e8f6fd 0%, #d4ecfa 100%);
    border: 1px solid rgba(41, 171, 226, 0.3);
    border-radius: var(--hub-radius-lg);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.portal-hero-banner h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
}
.portal-hero-banner p {
    font-size: 0.8125rem;
    color: var(--hub-text-secondary);
    margin: 0.35rem 0 0;
    line-height: 1.5;
}
.portal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 700px) {
    .portal-stats { grid-template-columns: repeat(2, 1fr); }
}
.portal-stat {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    text-align: center;
}
.portal-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--instack-navy);
    line-height: 1;
}
.portal-stat-label {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hub-text-muted);
    margin-top: 0.35rem;
}
.portal-stat-warn .portal-stat-value { color: #d97706; }
.portal-stat-ok .portal-stat-value { color: #15803d; }
.portal-stat-info .portal-stat-value { color: var(--instack-cyan); }

.portal-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 4px;
    width: 100%;
    max-width: 100%;
}
.portal-nav-card {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    padding: 0.65rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--hub-shadow-sm);
}
.portal-nav-card .portal-tabs {
    margin-bottom: 0;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
}
.portal-filter-row {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-border);
}
@media (min-width: 640px) {
    .portal-filter-row {
        flex-direction: row;
        align-items: center;
        gap: 0.85rem;
    }
}
.portal-filter-label {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hub-text-muted);
    flex-shrink: 0;
    padding-left: 0.15rem;
}
.portal-filter-track {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    padding: 3px;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
}
.portal-filter-track .portal-filter-chip,
.portal-filter-track button.portal-filter-chip,
.portal-page .portal-filter-chip,
.portal-page button.portal-filter-chip {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.48rem 0.8rem;
    border-radius: 9px;
    border: none !important;
    outline: none;
    background: transparent;
    color: var(--hub-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    font-family: var(--font);
    line-height: 1.2;
    margin: 0;
    box-shadow: none;
}
.portal-filter-track .portal-filter-chip i,
.portal-page .portal-filter-chip i {
    font-size: 0.85rem;
    opacity: 0.9;
}
.portal-filter-track .portal-filter-chip:hover,
.portal-page .portal-filter-chip:hover {
    color: var(--instack-navy);
    background: rgba(255, 255, 255, 0.85);
}
.portal-filter-track .portal-filter-chip.active,
.portal-page .portal-filter-chip.active {
    background: var(--instack-gradient);
    color: #fff;
    box-shadow: var(--hub-shadow-sm);
}
.portal-filter-track .portal-filter-chip.active i,
.portal-page .portal-filter-chip.active i { opacity: 1; }
.portal-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.22);
    margin-left: 0.1rem;
}
.portal-page .portal-filter-chip:not(.active) .portal-filter-count {
    background: var(--hub-surface);
    color: var(--hub-text-muted);
    border: 1px solid var(--hub-border);
}
.portal-filter-status {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--instack-navy);
    margin: 0.55rem 0 0;
    padding: 0.35rem 0.5rem;
    min-height: 1.25rem;
    border-radius: 8px;
    transition: background 0.2s;
}
.portal-filter-status.is-updated {
    background: rgba(41, 171, 226, 0.12);
}
.portal-filter-empty {
    display: none;
    text-align: center;
    padding: 2.5rem 1.25rem;
    background: var(--hub-surface);
    border: 1px dashed var(--hub-border);
    border-radius: var(--hub-radius-lg);
    color: var(--hub-text-muted);
}
.portal-filter-empty i {
    font-size: 1.75rem;
    opacity: 0.35;
    margin-bottom: 0.65rem;
    display: block;
}
.portal-tab {
    padding: 0.6rem 1.15rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hub-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: var(--font);
}
.portal-tab:hover { color: var(--instack-navy); background: var(--hub-bg-soft); }
.portal-tab.active {
    background: var(--instack-gradient);
    color: #fff;
    box-shadow: var(--hub-shadow-sm);
}
.portal-tab-count {
    display: inline-block;
    min-width: 1.25rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-left: 0.35rem;
    background: rgba(255,255,255,0.25);
}
.portal-tab:not(.active) .portal-tab-count {
    background: var(--hub-surface-2);
    color: var(--hub-text-muted);
}
.portal-tab-panel { display: none; }
.portal-tab-panel.active { display: block; }

.portal-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    color: var(--hub-text-muted);
}
.portal-empty i { font-size: 2.25rem; opacity: 0.35; margin-bottom: 0.85rem; display: block; }
.portal-posts { display: flex; flex-direction: column; gap: 1.25rem; }

.portal-post {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    overflow: hidden;
    box-shadow: var(--hub-shadow-sm);
    transition: box-shadow 0.15s;
}
.portal-post:hover { box-shadow: var(--hub-shadow); }
.portal-post-grid {
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .portal-post-grid { grid-template-columns: 260px 1fr; }
}
.portal-post-media {
    background: var(--hub-surface-2);
    border-bottom: 1px solid var(--hub-border);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
@media (min-width: 768px) {
    .portal-post-media {
        border-bottom: none;
        border-right: 1px solid var(--hub-border);
        min-height: 260px;
    }
}
.portal-post-media img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}
@media (min-width: 768px) {
    .portal-post-media img { min-height: 260px; }
}
.portal-post-media-placeholder {
    color: var(--hub-text-muted);
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: inherit;
}
.portal-post-media-placeholder i {
    font-size: 1.75rem;
    opacity: 0.45;
}
.portal-post-media-placeholder a {
    color: var(--instack-cyan);
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
}
.portal-post-media-empty span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hub-text-muted);
    max-width: 140px;
    line-height: 1.4;
}
.portal-post-media-empty-compact {
    padding: 0.5rem;
}
.portal-post-media-empty-compact span { font-size: 0.62rem; max-width: 100%; }
.portal-post-media-empty-compact i { font-size: 1.1rem; }
.portal-post-body { padding: 1.25rem 1.35rem; display: flex; flex-direction: column; min-height: 0; }
.portal-post-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}
.portal-post-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0.4rem 0 0;
    line-height: 1.3;
}
.portal-post-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hub-text);
    text-align: right;
    white-space: nowrap;
}
.portal-post-date small {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--hub-text-muted);
    margin-top: 0.1rem;
}
.portal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}
.portal-tag {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--hub-surface-2);
    color: var(--instack-navy);
    border: 1px solid var(--hub-border);
}
.portal-tag-audience {
    background: var(--hub-accent-light);
    border-color: rgba(41, 171, 226, 0.25);
}
.portal-caption-box {
    background: var(--hub-bg-soft);
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}
.portal-caption-label {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
    margin: 0 0 0.4rem;
}
.portal-caption-text {
    font-size: 0.8125rem;
    color: var(--hub-text);
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}
.portal-hashtags {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--instack-cyan);
    margin-bottom: 0.85rem;
}
.portal-feedback-prev {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.85rem;
}
.portal-feedback-prev-title {
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #b45309;
    margin: 0 0 0.3rem;
}
.portal-feedback-prev p {
    font-size: 0.78rem;
    color: #92400e;
    margin: 0;
    white-space: pre-line;
    line-height: 1.55;
}
.portal-action-box {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
}
.portal-action-box-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0 0 0.85rem;
}
.portal-action-fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.portal-action-fields textarea.hub-input {
    min-height: 76px;
    resize: vertical;
    padding: 0.7rem 0.9rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}
.portal-action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.portal-btn-approve,
.portal-btn-change,
.portal-btn-reject {
    font-weight: 800;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid;
    font-family: var(--font);
}
.portal-btn-approve {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-color: #86efac;
}
.portal-btn-approve:hover { background: #22c55e; color: #fff; border-color: #22c55e; }
.portal-btn-change {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.portal-btn-change:hover { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.portal-btn-reject {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.portal-btn-reject:hover { background: #ef4444; color: #fff; border-color: #ef4444; }
.portal-status-msg {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
    font-size: 0.8125rem;
    font-weight: 700;
}
.portal-status-msg-ok { color: #15803d; }
.portal-status-msg-info { color: var(--instack-cyan); }
.portal-status-msg-wait { color: #b45309; }

/* Histórico */
.portal-history-list { display: flex; flex-direction: column; gap: 0.65rem; }
.portal-history-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.portal-history-clickable {
    cursor: pointer;
}
.portal-history-clickable:hover {
    box-shadow: var(--hub-shadow);
    border-color: rgba(41, 171, 226, 0.35);
    transform: translateY(-1px);
}
.portal-history-clickable:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--hub-accent-ring);
}
.portal-history-chevron {
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    color: var(--hub-text-muted);
    font-size: 0.75rem;
    opacity: 0.45;
    flex-shrink: 0;
}
.portal-history-clickable:hover .portal-history-chevron {
    opacity: 1;
    color: var(--instack-cyan);
}
.portal-view-modal { max-width: 520px; }
.portal-view-media {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
}
.portal-view-media img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
}
.portal-view-media-file {
    padding: 2.5rem;
    text-align: center;
    color: var(--hub-text-muted);
}
.portal-view-media-file a {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--instack-cyan);
    font-weight: 700;
    font-size: 0.8125rem;
}
.portal-view-media-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--hub-text-muted);
    background: var(--hub-surface-2);
    border: 1px dashed var(--hub-border);
    border-radius: 12px;
}
.portal-view-media-empty i {
    font-size: 2rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 0.65rem;
}
.portal-view-media-empty span {
    font-size: 0.8125rem;
    font-weight: 700;
}
.portal-view-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.portal-view-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hub-text-muted);
}
.portal-view-wait {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b45309;
    margin: 1rem 0 0;
    padding: 0.65rem 0.85rem;
    background: #fffbeb;
    border-radius: 10px;
    border: 1px solid #fde68a;
}

.portal-history-thumb {
    width: 88px;
    flex-shrink: 0;
    background: var(--hub-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--hub-border);
    overflow: hidden;
}
.portal-history-thumb img {
    width: 100%;
    height: 100%;
    min-height: 88px;
    object-fit: cover;
}
.portal-history-thumb i {
    font-size: 1.25rem;
    color: var(--hub-text-muted);
    opacity: 0.5;
}
.portal-history-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem;
    text-align: center;
    width: 100%;
    height: 100%;
    min-height: 88px;
}
.portal-history-no-image i {
    font-size: 1.1rem;
    opacity: 0.4;
}
.portal-history-no-image span {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--hub-text-muted);
    line-height: 1.2;
}
.portal-history-body {
    flex: 1;
    padding: 0.85rem 1rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.portal-history-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.portal-history-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    line-height: 1.3;
}
.portal-history-meta {
    font-size: 0.68rem;
    color: var(--hub-text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.portal-history-feedback {
    font-size: 0.72rem;
    color: var(--hub-text-secondary);
    margin: 0.35rem 0 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.portal-history-action {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.35rem;
}
.portal-history-action-ok { color: #15803d; }
.portal-history-action-reject { color: #b91c1c; }
.portal-history-action-change { color: #b45309; }
.portal-history-action-pub { color: var(--instack-cyan); }

/* FullCalendar */
.hub-app .fc { --fc-border-color: var(--hub-border); --fc-page-bg-color: transparent; --fc-neutral-bg-color: var(--hub-surface-2); --fc-list-event-hover-bg-color: var(--hub-accent-light); --fc-today-bg-color: rgba(41,171,226,0.06); font-family: var(--font); }
.hub-app .fc-toolbar-title { color: var(--hub-text) !important; font-weight: 800 !important; }
.hub-app .fc .fc-button-primary { background: var(--hub-surface) !important; border: 1px solid var(--hub-border) !important; color: var(--hub-text-secondary) !important; border-radius: 10px !important; box-shadow: var(--hub-shadow-sm) !important; }
.hub-app .fc .fc-button-primary:hover { background: var(--hub-surface-2) !important; color: var(--instack-navy) !important; }
.hub-app .fc .fc-button-active { background: var(--hub-accent-light) !important; color: var(--instack-navy) !important; border-color: rgba(41,171,226,0.4) !important; }
.hub-app .fc-col-header-cell-cushion { color: var(--hub-text-muted) !important; font-weight: 700 !important; }
.hub-app .fc-day-today .fc-col-header-cell-cushion { color: var(--instack-cyan) !important; }
.hub-app .fc-list { border: 1px solid var(--hub-border) !important; border-radius: 14px !important; background: var(--hub-surface) !important; }
.hub-app .fc-list-day-cushion { background: var(--hub-surface-2) !important; color: var(--instack-navy) !important; border-color: var(--hub-border) !important; }
.hub-app .fc-list-event-title a { color: var(--hub-text) !important; }

#mobile-overlay { background: rgba(15, 35, 71, 0.35) !important; }

/* ---- View: Clientes ---- */
.hub-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.hub-view-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--instack-navy);
    letter-spacing: -0.02em;
    margin: 0;
}
.hub-view-desc {
    font-size: 0.875rem;
    color: var(--hub-text-muted);
    margin: 0.35rem 0 0;
}
.hub-btn-secondary {
    background: var(--hub-surface) !important;
    border: 1px solid var(--hub-border-strong) !important;
    color: var(--instack-navy) !important;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: var(--hub-shadow-sm);
}
.hub-btn-secondary:hover {
    background: var(--hub-accent-light) !important;
    border-color: rgba(41, 171, 226, 0.4) !important;
}

.hub-clients-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}
@media (min-width: 1280px) {
    .hub-clients-layout { flex-direction: row; }
}

.hub-table-wrap {
    flex: 1;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    overflow: hidden;
    box-shadow: var(--hub-shadow-sm);
    display: flex;
    flex-direction: column;
}
.hub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.hub-table thead {
    background: var(--instack-navy);
    color: #fff;
}
.hub-table thead th {
    padding: 0.85rem 1.25rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    text-align: left;
    white-space: nowrap;
}
.hub-table thead th:last-child { text-align: right; }
.hub-table tbody tr {
    border-bottom: 1px solid var(--hub-border);
    transition: background 0.12s;
    cursor: pointer;
}
.hub-table tbody tr:hover { background: var(--hub-accent-light); }
.hub-table tbody tr:last-child { border-bottom: none; }
.hub-table tbody td {
    padding: 1rem 1.25rem;
    color: var(--hub-text-secondary);
    vertical-align: middle;
}
.hub-table tbody td:last-child { text-align: right; }
.hub-table-empty {
    text-align: center;
    padding: 3rem 1.5rem !important;
    color: var(--hub-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}
.hub-table-name {
    font-weight: 700;
    color: var(--hub-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.hub-table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--hub-accent-light);
    border: 1px solid rgba(41, 171, 226, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.hub-table-sub { font-size: 0.7rem; color: var(--hub-text-muted); font-weight: 500; margin-top: 0.15rem; }
.hub-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    background: var(--hub-surface-2);
    color: var(--instack-navy);
    border: 1px solid var(--hub-border);
}
.hub-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}
.hub-status-ativo { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.hub-status-lead { background: #fef9c3; color: #a16207; border: 1px solid #fde047; }
.hub-status-concluido { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd; }
.hub-status-inativo { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.hub-table-action {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: var(--hub-accent-light);
    color: var(--instack-navy);
    border: 1px solid rgba(41, 171, 226, 0.3);
    cursor: pointer;
    transition: all 0.15s;
}
.hub-table-action:hover {
    background: var(--instack-cyan);
    color: #fff;
    border-color: var(--instack-cyan);
}

.hub-form-panel {
    width: 100%;
    flex-shrink: 0;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--hub-shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
}
@media (min-width: 1280px) {
    .hub-form-panel { width: 400px; }
}
.hub-form-panel-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0 0 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hub-border);
}
.hub-form-field { margin-bottom: 1rem; }
.hub-form-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
    margin-bottom: 0.4rem;
}
.hub-form-field .hub-input,
.hub-form-field select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
}
.hub-form-section {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--hub-border);
}
.hub-form-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--instack-navy);
    margin-bottom: 0.85rem;
}
.hub-form-hint { font-size: 0.7rem; color: var(--hub-text-muted); margin-top: 0.5rem; }

/* ---- View: Financeiro ---- */
.fin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-bottom: 2rem;
}
@media (min-width: 1280px) {
    .fin-grid { grid-template-columns: 1fr 1fr; }
}
.fin-panel {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    overflow: hidden;
    box-shadow: var(--hub-shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 380px;
}
.fin-panel-tall { min-height: 420px; }
.fin-panel-head {
    padding: 1.15rem 1.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--hub-border);
}
.fin-panel-head h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.fin-panel-head p {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0.25rem 0 0;
    opacity: 0.75;
}
.fin-panel-total {
    font-size: 1.35rem;
    font-weight: 800;
    white-space: nowrap;
}
.fin-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--hub-bg-soft);
}
.fin-panel-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--hub-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}
.fin-panel-receber .fin-panel-head {
    background: linear-gradient(135deg, #e0f5fc 0%, #cceefb 100%);
    border-bottom-color: rgba(41, 171, 226, 0.3);
}
.fin-panel-receber .fin-panel-head h3 { color: #0c5a7a; }
.fin-panel-receber .fin-panel-head p { color: #0c5a7a; }
.fin-panel-receber .fin-panel-total { color: var(--instack-navy); }
.fin-panel-receber .fin-panel-head i { color: var(--instack-cyan); }

.fin-panel-pagar .fin-panel-head {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom-color: #fecaca;
}
.fin-panel-pagar .fin-panel-head h3 { color: #b91c1c; }
.fin-panel-pagar .fin-panel-head p { color: #b91c1c; }
.fin-panel-pagar .fin-panel-total { color: #991b1b; }
.fin-panel-pagar .fin-panel-head i { color: #ef4444; }

.fin-panel-done-in .fin-panel-head {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom-color: #bbf7d0;
}
.fin-panel-done-in .fin-panel-head h3 { color: #166534; }
.fin-panel-done-in .fin-panel-head p { color: #166534; }
.fin-panel-done-in .fin-panel-total { color: #15803d; }

.fin-panel-done-out .fin-panel-head {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-bottom-color: #fed7aa;
}
.fin-panel-done-out .fin-panel-head h3 { color: #c2410c; }
.fin-panel-done-out .fin-panel-head p { color: #c2410c; }
.fin-panel-done-out .fin-panel-total { color: #ea580c; }

.fin-row {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fin-row:hover {
    border-color: rgba(41, 171, 226, 0.35);
    box-shadow: var(--hub-shadow-sm);
}
.fin-row:last-child { margin-bottom: 0; }
.fin-row-done { opacity: 0.85; }
.fin-row-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--hub-text);
    margin: 0;
}
.fin-row-done .fin-row-title {
    color: var(--hub-text-muted);
    text-decoration: line-through;
}
.fin-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}
.fin-chip {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--hub-surface-2);
    color: var(--hub-text-secondary);
    border: 1px solid var(--hub-border);
}
.fin-chip-overdue { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.fin-chip-empresa { background: var(--hub-accent-light); color: var(--instack-navy); border-color: rgba(41, 171, 226, 0.25); }
.fin-row-value {
    font-weight: 800;
    font-size: 0.95rem;
    text-align: right;
    white-space: nowrap;
}
.fin-val-receber { color: #0c5a7a; }
.fin-val-pagar { color: #b91c1c; }
.fin-val-done-in { color: #15803d; }
.fin-val-done-out { color: #c2410c; }
.fin-row-btn {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 0.35rem;
    opacity: 0;
    transition: opacity 0.15s;
}
.fin-row:hover .fin-row-btn { opacity: 1; }
.fin-btn-receber { background: #dcfce7; color: #166534; }
.fin-btn-receber:hover { background: #22c55e; color: #fff; }
.fin-btn-pagar { background: #fee2e2; color: #b91c1c; }
.fin-btn-pagar:hover { background: #ef4444; color: #fff; }
.fin-paid-label { font-size: 0.65rem; font-weight: 700; margin-top: 0.25rem; }

/* ---- Toolbar: mês + KPIs ---- */
.fin-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}
.fin-month-bar {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 0.35rem;
    padding: 0.35rem;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 999px;
    box-shadow: var(--hub-shadow-sm);
}
.fin-month-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--instack-navy);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.fin-month-btn:hover {
    background: var(--hub-accent-light);
    color: var(--instack-cyan);
}
.fin-month-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8f7fc 0%, #f0f7ff 100%);
    color: var(--instack-navy);
    cursor: pointer;
    min-width: 190px;
    justify-content: center;
    user-select: none;
}
.fin-month-label > i {
    color: var(--instack-cyan);
    font-size: 0.9rem;
}
.fin-month-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.fin-month-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none;
    font-size: 1rem;
}
.fin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
@media (min-width: 900px) {
    .fin-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.fin-kpi {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    box-shadow: var(--hub-shadow-sm);
    min-width: 0;
}
.fin-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.fin-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.fin-kpi-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
}
.fin-kpi-value {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fin-kpi-receber .fin-kpi-icon { background: #e0f5fc; color: #0c5a7a; }
.fin-kpi-receber .fin-kpi-value { color: #0c5a7a; }
.fin-kpi-pagar .fin-kpi-icon { background: #fee2e2; color: #b91c1c; }
.fin-kpi-pagar .fin-kpi-value { color: #b91c1c; }
.fin-kpi-recebido .fin-kpi-icon { background: #dcfce7; color: #15803d; }
.fin-kpi-recebido .fin-kpi-value { color: #15803d; }
.fin-kpi-pago .fin-kpi-icon { background: #ffedd5; color: #c2410c; }
.fin-kpi-pago .fin-kpi-value { color: #c2410c; }

.fin-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.fin-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.35rem;
}
.fin-row-actions form {
    margin: 0;
}
.fin-btn-edit {
    background: #e0f2fe;
    color: #0369a1;
    opacity: 1;
    padding: 0.3rem 0.5rem;
}
.fin-btn-edit:hover {
    background: #0ea5e9;
    color: #fff;
}
.fin-chip-recorrente {
    display: inline-flex;
    align-items: center;
    background: #eef2ff;
    color: #4f46e5;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.6rem;
}

/* ---- Conta recorrente (modal) ---- */
.fin-rec-box {
    margin-top: 0.75rem;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    border: 1px solid rgba(41, 171, 226, 0.28);
    border-radius: 16px;
    padding: 1rem 1.1rem;
}
.fin-rec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.fin-rec-head-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.fin-rec-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #29abe2 0%, #1A4297 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.fin-rec-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--instack-navy);
}
.fin-rec-sub {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: var(--hub-text-muted);
}
.fin-rec-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}
.fin-rec-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.fin-rec-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.2s;
}
.fin-rec-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.fin-rec-switch input:checked + .fin-rec-slider {
    background: var(--instack-cyan);
}
.fin-rec-switch input:checked + .fin-rec-slider::before {
    transform: translateX(20px);
}
.fin-rec-body {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(41, 171, 226, 0.18);
}
.fin-rec-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}
@media (min-width: 560px) {
    .fin-rec-choices { grid-template-columns: 1fr 1fr; }
}
.fin-rec-choice {
    cursor: pointer;
    margin: 0;
}
.fin-rec-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.fin-rec-choice-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1.5px solid var(--hub-border);
    background: #fff;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.fin-rec-choice-card i {
    color: var(--instack-cyan);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}
.fin-rec-choice-card strong {
    font-size: 0.82rem;
    color: var(--instack-navy);
}
.fin-rec-choice-card small {
    font-size: 0.7rem;
    color: var(--hub-text-muted);
}
.fin-rec-choice input:checked + .fin-rec-choice-card {
    border-color: var(--instack-cyan);
    background: #eef9fd;
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.12);
}
.fin-rec-meses-row {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.fin-rec-meses-row label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hub-text-secondary);
    margin: 0;
}
.fin-rec-meses-input {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.fin-rec-meses-input .hub-input {
    width: 72px;
    text-align: center;
    font-weight: 800;
    padding: 0.45rem 0.4rem;
}
.fin-rec-step {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface);
    color: var(--instack-navy);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}
.fin-rec-step:hover {
    background: var(--hub-accent-light);
    border-color: var(--instack-cyan);
    color: var(--instack-cyan);
}
.fin-rec-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.85rem 0 0;
    font-size: 0.72rem;
    color: var(--hub-text-muted);
    line-height: 1.4;
}
.fin-rec-hint i {
    color: var(--instack-cyan);
    margin-top: 0.1rem;
}
.fin-modal-footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
#modal-financeiro .hub-modal-footer {
    justify-content: space-between;
}

.fin-excluir-modal {
    max-width: 28rem;
}
.fin-excluir-msg {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--hub-text-secondary);
}
.fin-excluir-choices {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.fin-excluir-choice {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    text-align: left;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1.5px solid var(--hub-border);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.fin-excluir-choice:hover {
    border-color: var(--instack-cyan);
    background: #eef9fd;
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.1);
}
.fin-excluir-choice-danger:hover {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.fin-excluir-choice-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--hub-accent-light);
    color: var(--instack-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fin-excluir-choice-danger .fin-excluir-choice-icon {
    background: #fee2e2;
    color: #b91c1c;
}
.fin-excluir-choice-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.fin-excluir-choice-text strong {
    font-size: 0.875rem;
    color: var(--instack-navy);
}
.fin-excluir-choice-text small {
    font-size: 0.72rem;
    color: var(--hub-text-muted);
}

/* ---- Modals ---- */
.hub-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 35, 71, 0.45);
    backdrop-filter: blur(6px);
}
.hub-modal-overlay.hidden { display: none !important; }
.hub-modal {
    width: 100%;
    max-width: 44rem;
    max-height: 90vh;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius-lg);
    box-shadow: var(--hub-shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hub-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    background: var(--hub-surface);
    flex-shrink: 0;
}
.hub-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    letter-spacing: -0.02em;
}
.hub-modal-subtitle {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--instack-cyan);
    margin: 0.25rem 0 0;
}
.hub-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--hub-border);
    background: var(--hub-surface-2);
    color: var(--hub-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.hub-modal-close:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}
.hub-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--hub-bg-soft);
}
.hub-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 1.15rem 1.5rem;
    border-top: 1px solid var(--hub-border);
    background: var(--hub-surface);
    flex-shrink: 0;
}
.hub-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .hub-modal-grid { grid-template-columns: 1fr 1fr; }
}
.hub-modal-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .hub-modal-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.hub-modal-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
    margin-bottom: 0.4rem;
}
.hub-modal-field .hub-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.875rem;
}
.hub-modal-field-entrada label { color: #0c5a7a; }
.hub-modal-field-saida label { color: #b91c1c; }
.hub-modal-field-entrada .hub-input { border-color: rgba(41, 171, 226, 0.35) !important; }
.hub-modal-field-saida .hub-input { border-color: rgba(239, 68, 68, 0.35) !important; }

.fin-type-toggle {
    display: flex;
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    max-width: 360px;
    margin: 0 auto 1.5rem;
    box-shadow: var(--hub-shadow-sm);
}
.fin-type-toggle label { flex: 1; cursor: pointer; }
.fin-type-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.fin-type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.5rem;
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--hub-text-muted);
    transition: all 0.15s;
    text-align: center;
}
.fin-type-toggle input:checked + .fin-type-option-entrada {
    background: linear-gradient(135deg, #e0f5fc, #cceefb);
    color: #0c5a7a;
    box-shadow: var(--hub-shadow-sm);
}
.fin-type-toggle input:checked + .fin-type-option-saida {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    box-shadow: var(--hub-shadow-sm);
}
.fin-modal-section {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 1.15rem;
    margin-top: 0.25rem;
}
.fin-modal-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--instack-navy);
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--hub-border);
}

/* Logo utility */
.brand-logo { height: auto; max-height: 44px; width: auto; object-fit: contain; border: none; box-shadow: none; background: none; }
.brand-logo-sm { max-height: 36px; }
.brand-logo-lg { max-height: 64px; }

/* ---- Cliente detalhe + Drive ---- */
.cli-detalhe-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    padding-bottom: 2.5rem;
    max-width: 1280px;
}
.cli-detalhe-back {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}
.cli-detalhe-back:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(-2px);
}
.cli-detalhe-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.cli-detalhe-sub {
    font-size: 0.78rem;
    color: var(--hub-text-muted);
    margin: 0.25rem 0 0;
}
.cli-detalhe-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 320px;
    color: var(--hub-text-muted);
}
.cli-detalhe-empty i { font-size: 2rem; opacity: 0.5; }

/* Hero do perfil */
.cli-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--hub-border);
    box-shadow: var(--hub-shadow);
    background: var(--hub-surface);
}
.cli-hero-bg {
    position: absolute;
    inset: 0 0 auto 0;
    height: 88px;
    background: linear-gradient(135deg, var(--instack-navy) 0%, #2563b8 55%, var(--instack-cyan) 100%);
}
.cli-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.18) 0%, transparent 55%);
}
.cli-hero-inner {
    position: relative;
    padding: 1.1rem 1.35rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}
@media (min-width: 900px) {
    .cli-hero-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1.5rem;
    }
}
.cli-hero-main {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    min-width: 0;
    flex: 1;
}
.cli-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(26, 66, 151, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.cli-hero-text { min-width: 0; padding-bottom: 0.15rem; }
.cli-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}
.cli-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: 100%;
}
@media (min-width: 900px) {
    .cli-hero-stats {
        grid-template-columns: repeat(4, auto);
        width: auto;
        gap: 0.65rem;
    }
}
.cli-stat {
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
    border-radius: 12px;
    padding: 0.55rem 0.85rem;
    min-width: 110px;
}
.cli-stat-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--hub-text-muted);
    margin-bottom: 0.2rem;
}
.cli-stat strong {
    font-size: 0.8rem;
    color: var(--instack-navy);
    font-weight: 700;
    word-break: break-word;
}

/* Grid principal: drive + cofre */
.cli-detalhe-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 1100px) {
    .cli-detalhe-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    }
}

/* Drive */
.drive-panel {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 18px;
    box-shadow: var(--hub-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.drive-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--hub-border);
}
.drive-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.drive-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(41, 171, 226, 0.15), rgba(26, 66, 151, 0.08));
    border: 1px solid rgba(41, 171, 226, 0.22);
    color: var(--instack-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.drive-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    line-height: 1.2;
}
.drive-subtitle {
    font-size: 0.72rem;
    color: var(--hub-text-muted);
    margin: 0.15rem 0 0;
    font-weight: 500;
}
.drive-count {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hub-text-muted);
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}
.drive-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.drive-view-toggle {
    display: flex;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}
.drive-view-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--hub-text-muted);
    cursor: pointer;
    transition: all 0.12s;
}
.drive-view-btn:hover { color: var(--instack-navy); background: #fff; }
.drive-view-btn.active {
    background: #fff;
    color: var(--instack-navy);
    box-shadow: var(--hub-shadow-sm);
}
.drive-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: var(--instack-navy);
    color: #fff;
    transition: all 0.15s;
    box-shadow: 0 4px 14px rgba(26, 66, 151, 0.22);
}
.drive-upload-btn:hover {
    background: #153570;
    transform: translateY(-1px);
}

.drive-drop-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    background: linear-gradient(135deg, rgba(41, 171, 226, 0.1), rgba(26, 66, 151, 0.06));
    border-bottom: 1px dashed rgba(41, 171, 226, 0.4);
    color: var(--instack-navy);
    font-size: 0.78rem;
    font-weight: 700;
}
.drive-drop-banner.visible { display: flex; }
.drive-drop-banner i { color: var(--instack-cyan); }

.drive-body {
    padding: 1.15rem;
    flex: 1;
    position: relative;
    transition: background 0.15s, outline 0.15s;
}
.drive-body-empty {
    display: flex;
    align-items: stretch;
}
.drive-body.drive-dragover {
    background: rgba(41, 171, 226, 0.03);
}
.drive-body.drive-dragover .drive-empty {
    border-color: var(--instack-cyan);
    background: rgba(41, 171, 226, 0.06);
    transform: scale(1.01);
}

.drive-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.75rem 1.5rem;
    border: 1.5px dashed rgba(41, 171, 226, 0.28);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--hub-surface-2) 0%, #fff 100%);
    cursor: pointer;
    transition: all 0.18s;
    min-height: 280px;
}
.drive-empty:hover {
    border-color: rgba(41, 171, 226, 0.5);
    background: linear-gradient(180deg, rgba(41, 171, 226, 0.05) 0%, #fff 100%);
}
.drive-empty-visual {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 1rem;
}
.drive-empty-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(41, 171, 226, 0.25);
    animation: drive-spin 18s linear infinite;
}
@keyframes drive-spin {
    to { transform: rotate(360deg); }
}
.drive-empty-icon {
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--hub-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--instack-cyan);
    box-shadow: var(--hub-shadow-sm);
}
.drive-empty-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0 0 0.35rem;
}
.drive-empty-text {
    font-size: 0.78rem;
    color: var(--hub-text-muted);
    margin: 0;
    max-width: 300px;
    line-height: 1.55;
}

.drive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.75rem;
}
.drive-grid.hidden { display: none; }
.drive-grid.drive-view-list {
    grid-template-columns: 1fr;
    gap: 0.45rem;
}
.drive-grid.drive-view-list .drive-card {
    flex-direction: row;
    align-items: stretch;
}
.drive-grid.drive-view-list .drive-card-preview {
    width: 68px;
    aspect-ratio: auto;
    min-height: 68px;
    flex-shrink: 0;
    border-right: 1px solid var(--hub-border);
}
.drive-grid.drive-view-list .drive-card-preview img { min-height: 68px; }
.drive-grid.drive-view-list .drive-card-icon { min-height: 68px; font-size: 1.35rem; }
.drive-grid.drive-view-list .drive-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.65rem 0.9rem;
}

.drive-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
}
.drive-card:hover {
    box-shadow: 0 8px 24px rgba(26, 66, 151, 0.1);
    border-color: rgba(41, 171, 226, 0.35);
    transform: translateY(-2px);
}
.drive-card-preview {
    position: relative;
    aspect-ratio: 1;
    background: var(--hub-surface-2);
    overflow: hidden;
}
.drive-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.drive-card-icon {
    width: 100%;
    height: 100%;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
}
.drive-tone-pdf { background: linear-gradient(160deg, #fff5f5, #fee2e2); color: #dc2626; }
.drive-tone-svg { background: linear-gradient(160deg, #faf5ff, #ede9fe); color: #7c3aed; }
.drive-tone-img { background: linear-gradient(160deg, #ecfdf5, #d1fae5); color: #059669; }
.drive-tone-file { background: var(--hub-surface-2); color: var(--hub-text-muted); }

.drive-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 66, 151, 0.1), rgba(26, 66, 151, 0.65));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    opacity: 0;
    transition: opacity 0.15s;
}
.drive-card:hover .drive-card-overlay { opacity: 1; }
.drive-card-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: none;
    background: rgba(255, 255, 255, 0.96);
    color: var(--instack-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.75rem;
    transition: transform 0.12s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.drive-card-btn:hover { transform: scale(1.08); }
.drive-card-btn-danger { color: #b91c1c; }
.drive-card-delete { display: inline; margin: 0; }

.drive-card-info { padding: 0.55rem 0.65rem 0.65rem; background: #fff; }
.drive-card-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--instack-navy);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drive-card-meta {
    font-size: 0.62rem;
    color: var(--hub-text-muted);
    margin: 0.15rem 0 0;
    font-weight: 600;
}

.drive-preview-modal { max-width: 560px; }
.drive-preview-media {
    border-radius: 12px;
    overflow: hidden;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
}
.drive-preview-media img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
}
.drive-preview-file {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--hub-border);
}
.drive-preview-file i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.drive-preview-file p {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--instack-navy);
    margin: 0 0 0.75rem;
}
.drive-preview-file a {
    color: var(--instack-cyan);
    font-weight: 700;
    font-size: 0.8125rem;
    text-decoration: none;
}

/* Cofre de acessos */
.cli-cofre-panel {
    background: var(--hub-surface);
    border: 1px solid var(--hub-border);
    border-radius: 18px;
    box-shadow: var(--hub-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.cli-cofre-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--hub-border);
}
.cli-cofre-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cli-cofre-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 66, 151, 0.1), rgba(26, 66, 151, 0.04));
    border: 1px solid rgba(26, 66, 151, 0.15);
    color: var(--instack-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}
.cli-cofre-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    line-height: 1.2;
}
.cli-cofre-sub {
    font-size: 0.72rem;
    color: var(--hub-text-muted);
    margin: 0.15rem 0 0;
    font-weight: 500;
}
.cli-cofre-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    background: #fff;
    color: var(--instack-navy);
    cursor: pointer;
    transition: all 0.15s;
}
.cli-cofre-add:hover,
.cli-cofre-add.active {
    background: var(--instack-navy);
    color: #fff;
    border-color: var(--instack-navy);
}

.cli-cofre-form {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hub-border);
    background: linear-gradient(180deg, var(--hub-surface-2), #fff);
}
.cli-cofre-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}
@media (min-width: 700px) {
    .cli-cofre-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .cli-cofre-form-grid .hub-form-field:nth-child(3) { grid-column: 1 / -1; }
}
.cli-cofre-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}
@media (min-width: 700px) {
    .cli-cofre-form-actions { grid-column: 1 / -1; }
}
.cli-cofre-cancel {
    padding: 0.55rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    background: #fff;
    color: var(--hub-text-muted);
    cursor: pointer;
}
.cli-cofre-cancel:hover { color: var(--instack-navy); border-color: rgba(41, 171, 226, 0.35); }

.cli-cofre-body {
    padding: 1rem 1.15rem 1.15rem;
    flex: 1;
    overflow-y: auto;
    max-height: 520px;
}
.cli-cofre-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.25rem;
    min-height: 280px;
    border: 1px dashed var(--hub-border);
    border-radius: 14px;
    background: var(--hub-surface-2);
}
.cli-cofre-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--hub-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--instack-navy);
    font-size: 1.15rem;
    margin-bottom: 0.85rem;
    opacity: 0.7;
}
.cli-cofre-empty-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0 0 0.3rem;
}
.cli-cofre-empty-text {
    font-size: 0.75rem;
    color: var(--hub-text-muted);
    margin: 0 0 1rem;
    max-width: 260px;
    line-height: 1.5;
}
.cli-cofre-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.75rem;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    background: var(--instack-navy);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
.cli-cofre-empty-btn:hover { background: #153570; }

.cofre-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.cofre-card {
    background: #fff;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.cofre-card:hover {
    box-shadow: 0 6px 20px rgba(26, 66, 151, 0.08);
    border-color: rgba(41, 171, 226, 0.28);
}
.cofre-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--hub-border);
}
.cofre-card-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}
.cofre-card-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--instack-navy), #2563b8);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cofre-card-plat {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--instack-navy);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cofre-card-type {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--hub-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cofre-card-delete button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--hub-text-muted);
    cursor: pointer;
    transition: all 0.12s;
}
.cofre-card-delete button:hover {
    background: #fef2f2;
    color: #b91c1c;
}
.cofre-card-fields {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.cofre-field label {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hub-text-muted);
    margin-bottom: 0.25rem;
}
.cofre-field-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--hub-surface-2);
    border: 1px solid var(--hub-border);
    border-radius: 10px;
    padding: 0.4rem 0.5rem 0.4rem 0.65rem;
}
.cofre-field-value {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--instack-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.cofre-pass-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.78rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--instack-navy);
    outline: none;
    min-width: 0;
}
.cofre-copy-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: #fff;
    color: var(--hub-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.12s;
    border: 1px solid var(--hub-border);
}
.cofre-copy-btn:hover {
    color: var(--instack-cyan);
    border-color: rgba(41, 171, 226, 0.35);
}
