/* =========================================================================
   CORPORATE DESIGN v2 — Referência Itaú + Dark/Light Mode
   ========================================================================= */

:root {
    /* Cores Corporativas Itaú */
    --primary: #FF6600;
    --primary-hover: #E55A00;
    --primary-ghost: rgba(255, 102, 0, 0.1);

    /* Fundos */
    --bg-base: #F5F5F5;
    --bg-white: #FFFFFF;

    /* Textos Base na DM Sans */
    --text-dark: #1A1A1A;
    --text-muted: #666666;
    --text-light: #888888;

    /* Bordas e Contornos (1px solid style) */
    --border-color: #E0E0E0;
    --border-light: #F0F0F0;

    /* Estrutura ZERO sombras */
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-card: none;

    /* Bordas */
    --radius-btn: 8px;
    /* rounded-lg */
    --radius-card: 12px;
    /* rounded-xl (cards padrão) / rounded-2xl p/ seções grandes */
    --radius-input: 8px;

    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* Font Family */
    --font-family: 'DM Sans', sans-serif;
}

body.dark-mode {
    --bg-base: #18191a;
    --bg-white: #242526;
    --bg-alt: #3a3b3c;
    --border-color: #3A3B3C;
    --text-dark: #F5F5F5;
    --text-body: #E4E6EB;
    --text-muted: #B0B3B8;
    --shadow-sm: none;
    --shadow-md: none;
    --primary-light: rgba(255, 102, 0, 0.15);
    --input-bg: #18191a;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-dark);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4,
strong {
    color: var(--text-dark);
}

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

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    outline: none;
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-muted);
}

.bg-orange-light {
    background-color: var(--primary-light);
    color: var(--primary);
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s, border-color 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.35s ease-out forwards;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    /* py-2 px-5 do prompt */
    border-radius: var(--radius-btn);
    /* 8px rounded-lg */
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
    text-decoration: none;
    box-shadow: none;
    /* ZERO shadow */
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-base);
    border-color: var(--primary);
    color: var(--primary);
}

.action-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.action-link:hover {
    text-decoration: underline;
}

/* =========================================================================
   LOGIN
   ========================================================================= */
.login-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-base);
}

.login-split {
    display: flex;
    height: 100vh;
    width: 100%;
}

.login-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
}

.brand-bg {
    background-color: var(--primary);
    color: white;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: white;
    line-height: 1.1;
}

.hero-content p {
    font-size: 18px;
    font-weight: 400;
    max-width: 420px;
    opacity: 0.9;
    color: white;
    line-height: 1.6;
}

.login-form-area {
    width: 520px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
    border-left: 1px solid var(--border-color);
    background: var(--bg-white);
    transition: background-color 0.3s;
}

.clean-login-box {
    width: 100%;
    max-width: 380px;
}

.login-logo {
    margin-bottom: 48px;
    height: 56px;
    display: block;
}

.clean-login-box h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.clean-login-box>div>p {
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    font-size: 14px;
    transition: all 0.2s;
    background: var(--input-bg);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-footer {
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.alert-box {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radius-input);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

.alert-box.success {
    background: #ECFDF5;
    color: var(--success);
    border-color: #A7F3D0;
}

.alert-box i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* =========================================================================
   NEW ARCHITECTURE: LEFT SIDEBAR + TOP HEADER (ITAÚ TAILWIND BLUEPRINT)
   ========================================================================= */

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-base);
}

/* --- ITAÚ B2B BLUEPRINT CSS --- */
/* Search Suggestions Overlay */
.itau-search-suggestions {
    position: absolute;
    top: 60px;
    right: 0;
    width: 400px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.itau-search-suggestions.hidden {
    display: none;
}

.search-suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-suggestion-item:hover {
    background: var(--bg-base);
}

.search-suggestion-item strong {
    font-size: 14px;
    color: var(--text-dark);
}

.search-suggestion-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.itau-main-wrapper {
    margin-left: 256px;
    /* ml-64 */
    margin-top: 64px;
    /* mt-16 */
    min-height: calc(100vh - 64px);
    background-color: var(--bg-base);
    /* #F5F5F5 */
    padding: 32px;
    /* p-8 */
    flex: 1;
    overflow-y: auto;
    width: calc(100% - 256px);
}

/* SIDEBAR */
.itau-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 256px;
    /* w-64 */
    height: 100vh;
    background-color: var(--primary);
    /* #FF6600 */
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.itau-logo-container {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.itau-logo-badge {
    background: white;
    color: var(--primary);
    font-style: italic;
    font-weight: 900;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 18px;
    line-height: 1;
}

.itau-logo-text {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.itau-nav-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 16px 12px 0 12px;
    /* mt-4 mx-3 */
}

.itau-nav-divider-sub {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 12px 12px 8px 12px;
    /* mt-3 mb-2 mx-3 */
}

.itau-nav {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

.itau-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    /* gap-3 */
    padding: 10px 12px;
    /* px-3 py-2.5 */
    margin: 0 8px 4px 8px;
    /* mx-2 */
    border-radius: 8px;
    /* rounded-lg */
    font-size: 14px;
    /* text-sm */
    font-weight: 600;
    /* font-semibold */
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
}

.itau-nav-item i {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
}

.itau-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.1);
    /* bg-black/10 */
    color: white;
}

.itau-nav-item.active {
    background-color: rgba(0, 0, 0, 0.15);
    /* bg-black/15 */
    color: white;
}

.itau-nav-label {
    font-size: 10px;
    /* text-[10px] */
    font-weight: 700;
    /* font-bold */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* tracking-widest */
    color: rgba(255, 255, 255, 0.4);
    padding: 0 20px;
    /* px-5 */
    margin-bottom: 4px;
    /* mb-1 */
    display: block;
}

.itau-user-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 12px;
    margin-right: 12px;
    padding: 16px;
    /* py-4 px-4 */
    display: flex;
    align-items: center;
    gap: 12px;
    /* gap-3 */
}

.itau-avatar {
    width: 32px;
    /* w-8 */
    height: 32px;
    /* h-8 */
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    /* bg-black/20 */
    color: white;
    font-size: 11px;
    /* text-[11px] */
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.itau-user-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.itau-name {
    color: white;
    font-size: 13px;
    /* text-[13px] */
    font-weight: 700;
}

.itau-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    /* text-[11px] */
}

.itau-logout-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: color 0.2s;
}

.itau-logout-btn:hover {
    color: white;
}

/* HEADER */
.itau-header {
    position: fixed;
    top: 0;
    left: 256px;
    /* left-64 */
    right: 0;
    height: 64px;
    /* h-16 */
    background-color: var(--bg-white);
    /* white */
    border-bottom: 1px solid var(--border-color);
    /* border-[#E0E0E0] */
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    /* px-8 */
}

.itau-breadcrumb {
    font-size: 13px;
    /* text-[13px] */
    display: flex;
    align-items: center;
    gap: 6px;
}

.crumb-light {
    color: var(--text-light);
}

/* #888888 */
.crumb-sep {
    color: var(--border-color);
}

/* #E0E0E0 */
.crumb-dark {
    color: #1A1A1A;
    font-weight: 800;
}

.itau-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    /* gap-3 */
}

.itau-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    /* gap-2 */
    background-color: var(--bg-base);
    /* #F5F5F5 */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* rounded-lg */
    padding: 8px 12px;
    /* px-3 py-2 */
    width: 250px;
}

.itau-search-box i {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    stroke-width: 1.75;
}

.itau-search-box input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-dark);
    width: 100%;
}

.itau-search-box input::placeholder {
    color: var(--text-light);
}

.itau-search-box button {
    background: transparent;
    color: var(--text-light);
    border: none;
    cursor: pointer;
}

.itau-notif-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    /* #666666 */
}

.itau-notif-btn i {
    width: 20px;
    height: 20px;
    stroke-width: 1.75;
}

.itau-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.itau-header-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
}

.itau-cta-btn {
    background-color: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 20px;
    /* px-5 py-2 */
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.itau-cta-btn:hover {
    background-color: var(--primary-hover);
}

/* MAIN DASHBOARD BLUEPRINT */
.itau-dash-header {
    margin-bottom: 32px;
    /* mb-8 */
}

.itau-dash-title {
    font-size: 24px;
    /* text-2xl */
    font-weight: 900;
    /* font-black */
    color: var(--text-dark);
    /* #1A1A1A */
    margin-bottom: 4px;
    /* mb-1 */
}

.itau-dash-subtitle {
    font-size: 14px;
    /* text-sm */
    color: var(--text-muted);
    /* #666666 */
}

/* KPI GRID */
.itau-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    /* gap-4 */
    margin-bottom: 32px;
    /* mb-8 */
}

.itau-kpi-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    /* rounded-xl */
    border: 1px solid var(--border-color);
    padding: 20px;
    /* p-5 */
    box-shadow: none !important;
    /* SEM sombra absolutamente */
}

.itau-kpi-card.alert-border {
    border-left: 3px solid var(--primary);
    /* #FF6600 */
}

.itau-kpi-label {
    font-size: 10px;
    /* text-[10px] */
    font-weight: 700;
    /* font-bold */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* tracking-widest */
    color: var(--text-light);
    /* #888888 */
    margin-bottom: 12px;
    /* mb-3 */
    display: block;
}

.itau-kpi-value {
    font-size: 36px;
    /* text-4xl */
    font-weight: 900;
    /* font-black */
    color: var(--text-dark);
    /* #1A1A1A */
    margin-bottom: 4px;
    /* mb-1 */
    line-height: 1;
}

.itau-kpi-sub {
    font-size: 12px;
    /* text-xs */
    font-weight: 600;
    /* font-semibold */
}

.text-green {
    color: #1A7A2E;
}

.text-orange {
    color: #B45309;
}

/* QUICK ACTIONS GRID */
.itau-section-title {
    font-size: 18px;
    /* text-lg */
    font-weight: 900;
    /* font-black */
    color: var(--text-dark);
    margin-bottom: 16px;
    /* mb-4 */
}

.itau-quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    /* gap-3 */
    margin-bottom: 32px;
    /* mb-8 */
}

.itau-quick-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    /* rounded-xl */
    border: 1px solid var(--border-color);
    padding: 16px;
    /* p-4 */
    cursor: pointer;
    transition: border-color 0.2s;
    box-shadow: none !important;
    /* SEM shadow */
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.itau-quick-card:hover {
    border-color: var(--primary);
    /* hover:border-[#FF6600] */
}

.itau-quick-icon {
    margin-bottom: 12px;
    /* mb-3 */
    color: var(--text-dark);
}

.itau-quick-icon i {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.itau-quick-title {
    font-size: 13px;
    /* text-[13px] */
    font-weight: 700;
    /* font-bold */
    color: var(--text-dark);
    margin-bottom: 4px;
    /* mb-1 */
}

.itau-quick-desc {
    font-size: 12px;
    /* text-[12px] */
    color: var(--text-muted);
    line-height: 1.25;
    /* leading-snug */
}

/* BOTTOM GRIDS */
.itau-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    /* gap-5 */
}

.itau-panel {
    background-color: var(--bg-white);
    border-radius: 16px;
    /* rounded-2xl */
    border: 1px solid var(--border-color);
    padding: 24px;
    /* p-6 */
    box-shadow: none !important;
}

.itau-col-2 {
    grid-column: span 2;
}

.itau-col-1 {
    grid-column: span 1;
}

.itau-table {
    width: 100%;
    border-collapse: collapse;
}

.itau-table th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    /* pb-2 */
    text-align: left;
}

.itau-table td {
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.itau-table tr:last-child td {
    border-bottom: none;
}

.itau-status-active {
    background-color: #DCFCE7;
    color: #1A7A2E;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    /* px-2.5 py-1 */
    border-radius: 4px;
    /* rounded, NOT rounded-full */
    display: inline-block;
}

.itau-status-pending {
    background-color: #FEF3C7;
    color: #B45309;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.itau-link-action {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.itau-link-action:hover {
    text-decoration: underline;
}

/* LOG ITEMS */
.itau-log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    /* gap-3 */
    padding: 12px 0;
    /* py-3 */
    border-bottom: 1px solid #F0F0F0;
}

.itau-log-item:last-child {
    border-bottom: 0;
}

.itau-log-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    justify-content: flex-end;
}

.mobile-nav-content {
    background: var(--bg-white);
    width: 280px;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-menu-btn .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-btn .avatar i {
    width: 18px;
    color: white;
}

.user-menu-btn>i {
    width: 16px;
    opacity: 0.8;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: var(--bg-white);
    border-radius: var(--radius-card);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.user-info-box {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.user-info-box strong {
    color: var(--text-dark);
    font-size: 14px;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    width: 100%;
    border-radius: var(--radius-input);
    background: var(--bg-base);
    color: var(--text-body);
    font-size: 13px;
    font-weight: 600;
    justify-content: center;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    width: 100%;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    border-radius: var(--radius-input);
}

.dropdown-item:hover {
    background: var(--bg-base);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-item.text-danger i {
    color: var(--danger);
}

/* --- MAIN CONTENT & CONTAINER --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-base);
}

.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px 100px 40px;
}

/* Modificando a topbar antiga para se adequar ao container */
.topbar {
    padding: 0 0 32px 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.page-title-box h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1;
}

.page-title-box p {
    font-size: 15px;
    margin-top: 8px;
    color: var(--text-muted);
}

.global-search-container {
    width: 380px;
}

.pill-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 4px 16px;
    border-radius: var(--radius-btn);
    transition: border-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.pill-search:focus-within {
    border-color: var(--primary);
}

.pill-search .search-icon {
    width: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.pill-search input {
    flex: 1;
    padding: 11px 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: var(--text-dark);
}

.pill-search input::placeholder {
    color: var(--text-muted);
}

#clearSearch {
    background: none;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    border: none;
}

#clearSearch:hover {
    color: var(--primary);
}

.views-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* Dashboard */
.dashboard-banner {
    padding: 48px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #FF8533 100%);
    border: none;
    color: white;
}

.banner-content {
    max-width: 550px;
}

.tag-orange {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
}

.banner-content h2 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: white;
}

.banner-content p {
    font-size: 16px;
    margin-bottom: 28px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.banner-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.banner-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.banner-content .btn-primary {
    width: auto;
    padding: 10px 24px;
    background: white;
    color: var(--primary);
    font-weight: 700;
    border-radius: 40px;
    /* Redondo pill (pílula) exclusivamente para o banner da home laranja */
}

.banner-content .btn-primary:hover {
    background: #F5F5F5;
}

.banner-content .btn-secondary {
    width: auto;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid white;
    color: white;
    font-weight: 600;
    font-size: 14px;
    border-radius: 40px;
    transition: background 0.2s, color 0.2s;
}

.banner-content .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* MINI-CARDS GRID (ITAÚ - Resolva as questões do dia a dia) */
.shortcuts-section {
    margin-bottom: 40px;
}

.section-heading-card {
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.shortcut-card {
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-align: left;
    height: 100%;
}

.shortcut-card:hover {
    border-color: #c9c9c9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.shortcut-card .shortcut-icon {
    margin-bottom: 16px;
    color: var(--text-dark);
}

.shortcut-card .shortcut-icon i {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.shortcut-card strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.2;
}

.shortcut-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.banner-content .btn-secondary {
    width: auto;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid white;
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-radius: 40px;
    transition: background 0.2s, color 0.2s;
}

.banner-content .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* CONFIG CARDS */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.config-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 24px;
}
.config-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}
.config-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 40px;
}
.config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.config-item .btn-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    padding: 2px;
}
.config-item .btn-remove:hover {
    color: var(--danger);
}
.config-add {
    display: flex;
    gap: 8px;
}
.config-add input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    font-size: 13px;
    background: var(--bg-base);
}
.btn-icon-add {
    background: var(--primary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-input);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.btn-icon-add:hover {
    background: var(--primary-hover);
}
.unidade-tag {
    background: var(--itau-orange-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-card {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border-color: #d8d8d8;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-content span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-content h3 {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-alt);
    border-radius: 50%;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

/* Filters */
.filter-header {
    margin-bottom: 32px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.filter-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    border-radius: var(--radius-card);
    /* ou 12px */
    cursor: pointer;
    transition: border-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: none !important;
}

.filter-card:hover {
    border-color: var(--primary);
}

.filter-card:hover .filter-card-icon {
    background: var(--primary);
    color: white;
}

.filter-card:hover .filter-card-arrow {
    color: var(--primary);
}

.filter-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.filter-card-icon i {
    width: 20px;
    height: 20px;
}

.filter-card-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.filter-card-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.filter-card-arrow {
    width: 18px;
    height: 18px;
    color: var(--border-color);
    transition: color 0.2s;
    flex-shrink: 0;
}

.filter-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-card span:not(.filter-card-count) {
    background: var(--bg-base);
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-body);
    border-radius: 20px;
}

/* Catalog */
.catalog-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.chip {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.2s;
    box-shadow: none !important;
}

.product-card:hover {
    border-color: var(--primary);
}

.card-hero {
    height: 160px;
    background: linear-gradient(135deg, #f7f7f7 0%, #e8e8e8 100%);
    position: relative;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-hero-icon {
    width: 48px;
    height: 48px;
    color: rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 24px 24px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 24px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item i {
    color: var(--primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(8, 126, 255, 0.1), rgba(184, 56, 255, 0.1));
    color: #4a5dff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(8, 126, 255, 0.15);
}

.ai-badge i {
    width: 10px !important;
    height: 10px !important;
    margin-top: 0 !important;
    color: #4a5dff !important;
}

.feature-item span {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.4;
}

.text-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.saiba-mais-link {
    font-size: 14px;
    font-weight: 700;
    color: #0045A5;
    /* Itaú Blue */
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: auto;
    font-family: inherit;
    border: none;
    background: transparent;
    padding: 0;
    transition: color 0.2s;
}

.saiba-mais-link:hover {
    color: #002e70;
}

/* Admin Tabs & Header */
.admin-header-tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.admin-tab {
    background: transparent;
    border: none;
    padding: 12px 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    cursor: pointer;
    transition: color 0.2s;
}

.admin-tab:hover {
    color: var(--text-dark);
}

.admin-tab.active {
    color: var(--primary);
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.user-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}

.user-card:hover {
    border-color: var(--primary);
}

.user-card-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.user-card-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.role-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
}

.role-badge.admin {
    background: var(--primary-light);
    color: var(--primary);
}

.role-badge.vendedor {
    background: var(--bg-base);
    color: var(--text-muted);
}

.invite-form {
    padding: 32px;
    max-width: 480px;
    border-radius: var(--radius-card);
}

/* No Results & Loading */
.no-results {
    padding: 56px;
    text-align: center;
    border-radius: var(--radius-card);
}

.no-results .icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
}

.no-results i {
    width: 28px;
    height: 28px;
}

.no-results h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.loading-state {
    padding: 56px;
    text-align: center;
    margin-top: 32px;
    border-radius: var(--radius-card);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =========================================================================
   MOBILE MENU BUTTON & OVERLAY
   ========================================================================= */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 50;
    width: 44px;
    height: 44px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    color: var(--text-dark);
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.mobile-menu-btn i {
    width: 22px;
    height: 22px;
}

.mobile-close-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    color: var(--text-dark);
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.mobile-close-btn i {
    width: 18px;
    height: 18px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* =========================================================================
   RESPONSIVE: TABLET
   ========================================================================= */
@media (max-width: 1024px) {
    .main-content {
        padding: 0 28px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .global-search-container {
        width: 280px;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .login-hero {
        padding: 48px;
    }
}

/* =========================================================================
   RESPONSIVE: MOBILE
   ========================================================================= */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-close-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .login-split {
        flex-direction: column;
    }

    .login-hero {
        display: none;
    }

    .login-form-area {
        width: 100%;
        border-left: none;
        padding: 40px 24px;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 60px;
    }

    .clean-login-box {
        max-width: 100%;
    }

    .login-logo {
        height: 44px;
        margin-bottom: 36px;
    }

    .clean-login-box h2 {
        font-size: 22px;
    }

    .main-content {
        padding: 0 16px;
    }

    .topbar {
        padding: 72px 0 16px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .global-search-container {
        width: 100%;
    }

    .page-title-box h1 {
        font-size: 22px;
    }

    .dashboard-banner {
        padding: 28px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px 24px;
    }

    .stat-content h3 {
        font-size: 30px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .users-list {
        grid-template-columns: 1fr;
    }

    .product-card:hover {
        border-color: var(--primary);
    }

    .filter-card:hover {
        transform: none;
    }

    .card-header {
        padding: 18px 20px 14px;
    }

    .card-body {
        padding: 14px 20px 22px;
    }

    .invite-form {
        max-width: 100%;
        padding: 22px;
    }

    .section-title {
        font-size: 18px;
    }

    ::-webkit-scrollbar {
        width: 0;
    }
}

@media (max-width: 400px) {
    .login-form-area {
        padding: 24px 16px;
        padding-top: 48px;
    }

    .clean-login-box h2 {
        font-size: 20px;
    }

    .input-group input {
        padding: 12px 14px;
        font-size: 13px;
    }

    .btn-primary {
        padding: 13px;
        font-size: 14px;
    }

    .main-content {
        padding: 0 12px;
    }

    .dashboard-banner {
        padding: 20px;
    }

    .banner-content h2 {
        font-size: 20px;
    }

    .stat-content h3 {
        font-size: 26px;
    }
}

/* =========================================================================
   ADMIN PANEL & CRUD TABLES
   ========================================================================= */
.admin-header-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.admin-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--text-dark);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.table-container {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: var(--bg-base);
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    background-color: var(--bg-alt);
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn i {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.action-btn.edit:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn.delete:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.table-container {
    overflow-x: auto;
    background: var(--bg-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sm i {
    width: 16px;
    height: 16px;
}

/* CRUD MODAL OVERLAYS */
#crudModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

#crudModalOverlay.hidden {
    display: none;
}

.crud-modal {
    background: var(--bg-white);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.crud-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.crud-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.crud-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.crud-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.crud-modal textarea.crud-input {
    min-height: 100px;
    resize: vertical;
}

/* =========================================================================
   AI CHAT WIDGET
   ========================================================================= */
.ai-chat-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(255, 96, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(255, 96, 0, 0.45);
}

.ai-chat-fab i {
    width: 24px;
    height: 24px;
}

.ai-chat-panel {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 420px;
    max-height: 560px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary);
    color: white;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-title i {
    width: 20px;
    height: 20px;
}

.ai-chat-title strong {
    display: block;
    font-size: 14px;
    color: white;
}

.ai-chat-title span {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    color: white;
}

.ai-chat-close {
    background: none;
    border: none;
    color: white;
    padding: 4px;
    cursor: pointer;
    display: flex;
}

.ai-chat-close i {
    width: 18px;
    height: 18px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    min-height: 200px;
}

.ai-msg {
    padding: 12px 16px;
    border-radius: var(--radius-card);
    font-size: 13px;
    line-height: 1.6;
    max-width: 92%;
    word-wrap: break-word;
}

.ai-msg p {
    margin-bottom: 8px;
}

.ai-msg p:last-child {
    margin-bottom: 0;
}

.ai-msg ul {
    margin: 8px 0;
    padding-left: 16px;
    list-style: disc;
}

.ai-msg li {
    margin-bottom: 4px;
}

.ai-msg strong {
    color: inherit;
}

.ai-msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-radius: var(--radius-card) var(--radius-card) 0 var(--radius-card);
}

.ai-msg.user strong {
    color: white;
}

.ai-msg.assistant {
    background: var(--bg-base);
    color: var(--text-body);
    align-self: flex-start;
    border: 1px solid var(--border-color);
}

.ai-msg.loading {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 16px 20px;
}

.ai-msg.loading .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: dotPulse 1.2s infinite;
}

.ai-msg.loading .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-msg.loading .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.ai-chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

.ai-chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    font-size: 13px;
    background: var(--input-bg);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    outline: none;
}

.ai-chat-input-area input:focus {
    border-color: var(--primary);
}

#aiChatSend {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    border: none;
}

#aiChatSend:hover {
    background: var(--primary-hover);
}

#aiChatSend i {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .ai-chat-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .ai-chat-fab i {
        width: 22px;
        height: 22px;
    }

    .ai-chat-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .ai-chat-header {
        border-radius: 0;
    }

    .ai-chat-messages {
        max-height: calc(100vh - 140px);
    }
}