/* ================================================
   CRUISE XPERTS - ATENDIMENTO CX
   Design System & All Styles
   ================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --color-primary: #0f5f6b;
    --color-primary-dark: #0a3d47;
    --color-primary-darker: #072d35;
    --color-primary-light: #14808f;
    --color-accent: #0d9488;
    --color-accent-hover: #0fb3a4;
    --color-sidebar-bg: #0e3d48;
    --color-sidebar-hover: rgba(255,255,255,0.08);
    --color-sidebar-active: rgba(255,255,255,0.14);
    --color-bg: #f0f2f5;
    --color-bg-card: #ffffff;
    --color-text: #1a1a2e;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-text-white: #ffffff;
    --color-border: #e2e8f0;
    --color-error: #ef4444;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-whatsapp: #25D366;
    --color-historico: #0d9488;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --sidebar-width: 220px;
    --transition-fast: 0.2s ease;
    --transition-med: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

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

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

input, select {
    font-family: inherit;
    font-size: inherit;
}

/* ================================================
   LOGIN SCREEN
   ================================================ */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0e3d48 0%, #0a2e36 40%, #14606d 100%);
    z-index: 1000;
    overflow: hidden;
}

.login-bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}

.login-bg-circle--1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #14808f, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: floatCircle1 8s ease-in-out infinite;
}

.login-bg-circle--2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #0d9488, transparent 70%);
    top: -80px;
    left: -60px;
    animation: floatCircle2 10s ease-in-out infinite;
}

@keyframes floatCircle1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -20px); }
}

@keyframes floatCircle2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 15px); }
}

.login-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 36px 36px;
    width: 380px;
    max-width: 95vw;
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: cardEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.login-logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}

.login-logo-icon .material-icons-outlined {
    font-size: 30px;
    color: #ffffff;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 28px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fafbfc;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
    background: #fff;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 14px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.92rem;
    color: var(--color-text);
}

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

.toggle-password {
    padding: 0 12px;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--color-text-secondary);
}

.toggle-password .material-icons-outlined {
    font-size: 20px;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: var(--color-error);
    font-size: 0.82rem;
    margin-bottom: 14px;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.login-error .material-icons-outlined {
    font-size: 18px;
}

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-text-white);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
    box-shadow: 0 4px 14px rgba(13,148,136,0.3);
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,148,136,0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .material-icons-outlined {
    font-size: 20px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
}

.login-divider hr {
    flex: 1;
    border: none;
    height: 1px;
    background: var(--color-border);
}

.login-divider span {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.login-register {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.login-register-link {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.login-register-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* ================================================
   APP SHELL
   ================================================ */
.app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
    animation: fadeInApp 0.5s ease;
}

@keyframes fadeInApp {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--color-sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 10;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.sidebar-header {
    padding: 16px 16px 8px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px rgba(13,148,136,0.5);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(13,148,136,0.4); }
    50% { box-shadow: 0 0 14px rgba(13,148,136,0.7); }
}

.brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-text-white);
    letter-spacing: -0.3px;
}

/* Sidebar user */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 6px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--color-text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status */
.sidebar-status {
    padding: 8px 16px 14px;
}

.status-select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    position: relative;
    margin-bottom: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot--online {
    background: var(--color-success);
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

.status-dot--almoco {
    background: #f59e0b;
}

.status-dot--lanche {
    background: #ec4899;
}

.status-dot--reuniao {
    background: #6366f1;
}

.status-dot--banheiro {
    background: #8b5cf6;
}

.status-dot--atendimento {
    background: #06b6d4;
}

.status-dot--offline {
    background: #94a3b8;
}

.status-select {
    background: transparent;
    border: none;
    color: var(--color-text-white);
    font-size: 0.78rem;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    flex: 1;
}

.status-select option {
    background: var(--color-sidebar-bg);
    color: var(--color-text-white);
}

.status-chevron {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    pointer-events: none;
}

.status-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(13,148,136,0.25);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 0.78rem;
    color: #5eead4;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.status-timer .material-icons-outlined {
    font-size: 15px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 4px 0;
}

.nav-section {
    margin-bottom: 2px;
}

.nav-section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    color: var(--color-text-white);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.nav-section-toggle:hover {
    background: var(--color-sidebar-hover);
}

.nav-icon .material-icons-outlined {
    font-size: 18px;
}

.nav-label {
    flex: 1;
    text-align: left;
}

.nav-arrow {
    font-size: 18px !important;
    color: rgba(255,255,255,0.5);
    transition: transform var(--transition-fast);
}

.nav-arrow.rotated {
    transform: rotate(180deg);
}

.nav-section-items {
    overflow: hidden;
    transition: max-height var(--transition-med);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px 9px 44px;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--color-sidebar-hover);
    color: var(--color-text-white);
}

.nav-item.active {
    background: var(--color-sidebar-active);
    color: var(--color-text-white);
    border-left-color: var(--color-accent);
}

.nav-item .material-icons-outlined {
    font-size: 17px;
}

.nav-item--direct {
    padding-left: 16px;
}

.nav-item--sair .material-icons-outlined {
    color: #f87171;
}

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-bg);
    position: relative;
}

.page {
    min-height: 100vh;
}

/* Page header */
.page-header {
    padding: 28px 32px 20px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.page-description {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.page-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--color-text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ================================================
   PAINEL (Dashboard)
   ================================================ */
.painel-layout {
    display: flex;
    height: 100vh;
}

.conversations-panel {
    width: 300px;
    min-width: 300px;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.conversations-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px 0;
}

.conversations-pin {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.conversations-pin:hover {
    color: var(--color-accent);
}

.conversations-pin .material-icons-outlined {
    font-size: 18px;
    transform: rotate(45deg);
}

.conversations-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    padding: 0 12px;
}

.conv-tab {
    flex: 1;
    padding: 12px 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.conv-tab:hover {
    color: var(--color-text-secondary);
}

.conv-tab.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    font-weight: 600;
}

.conv-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 4px;
    padding: 0 5px;
}

.conv-tab.active .conv-tab-count {
    background: rgba(13,148,136,0.12);
    color: var(--color-accent);
}

.conversations-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    flex: 1;
}

.conversations-empty p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.painel-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.painel-welcome {
    text-align: center;
    max-width: 500px;
}

.painel-welcome h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.painel-welcome-sub {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.painel-welcome-hint {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.btn-import {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(13,148,136,0.25);
}

.btn-import:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,148,136,0.35);
}

.btn-import .material-icons-outlined {
    font-size: 20px;
}

/* ================================================
   EQUIPE
   ================================================ */
.equipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 0 32px 32px;
}

/* ================================================
   FLUXO
   ================================================ */
.fluxo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 32px 32px;
}

.fluxo-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.fluxo-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 0;
}

.fluxo-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
}

.fluxo-icon {
    font-size: 20px !important;
}

.fluxo-icon--trafego {
    color: var(--color-warning);
}

.fluxo-icon--fila {
    color: var(--color-primary);
}

.fluxo-card-body {
    padding: 24px 20px 28px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fluxo-empty {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Histórico do Dia toggle */
.historico-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 600;
    font-size: 0.78rem;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: all var(--transition-fast);
    z-index: 20;
    cursor: pointer;
}

.historico-toggle:hover {
    background: var(--color-accent-hover);
    padding-right: 12px;
}

.historico-toggle .material-icons-outlined {
    font-size: 18px;
    writing-mode: horizontal-tb;
}

/* Histórico sidebar */
.historico-sidebar {
    width: 0;
    min-width: 0;
    background: var(--color-bg-card);
    border-left: 1px solid var(--color-border);
    overflow: hidden;
    transition: width var(--transition-med), min-width var(--transition-med);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.historico-sidebar.open {
    width: 320px;
    min-width: 320px;
}

.historico-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--color-accent);
    color: var(--color-text-white);
    font-weight: 600;
    flex-shrink: 0;
}

.historico-header .material-icons-outlined {
    font-size: 20px;
}

.historico-title {
    flex: 1;
    font-size: 0.95rem;
}

.historico-close {
    color: var(--color-text-white);
    transition: opacity var(--transition-fast);
}

.historico-close:hover {
    opacity: 0.7;
}

.historico-close .material-icons-outlined {
    font-size: 22px;
}

.historico-body {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.historico-empty {
    color: var(--color-accent);
    font-size: 0.88rem;
    font-style: italic;
}

/* ================================================
   PERFIL - REDESIGNED
   ================================================ */
.perfil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 32px;
}

.perfil-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    padding: 24px;
}

.perfil-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.perfil-card-title .material-icons-outlined {
    font-size: 22px;
    color: var(--color-text-secondary);
}

.perfil-card-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Avatar section */
.perfil-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.perfil-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.2rem;
    flex-shrink: 0;
    position: relative;
    margin-bottom: 12px;
    border: 3px solid #e2e8f0;
}

.perfil-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.perfil-avatar-badge:hover {
    background: var(--color-accent-hover);
}

.perfil-avatar-badge .material-icons-outlined {
    font-size: 14px;
    color: #fff;
}

.perfil-user-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2px;
}

.perfil-user-email {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.perfil-badge {
    display: inline-block;
    padding: 3px 12px;
    background: var(--color-primary-dark);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Perfil form */
.perfil-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.perfil-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 5px;
}

.perfil-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fafbfc;
    font-size: 0.9rem;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.perfil-form-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
    background: #fff;
}

.btn-salvar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-shadow: 0 3px 10px rgba(13,148,136,0.25);
    align-self: flex-start;
    margin-top: 4px;
}

.btn-salvar:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-salvar .material-icons-outlined {
    font-size: 18px;
}

/* Status de Atendimento */
.perfil-status-atual {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.perfil-status-atual .status-dot {
    width: 12px;
    height: 12px;
}

.perfil-status-label {
    display: block;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-bottom: 1px;
}

.perfil-status-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Status grid */
.perfil-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.perfil-status-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.perfil-status-btn:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(13,148,136,0.1);
}

.perfil-status-btn.active {
    border-color: var(--color-accent);
    background: rgba(13,148,136,0.04);
    box-shadow: 0 0 0 2px rgba(13,148,136,0.15);
}

.pstatus-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 14px;
    flex-shrink: 0;
}

.pstatus-dot--online {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 6px rgba(34,197,94,0.4);
}

.pstatus-dot--almoco,
.pstatus-dot--lanche,
.pstatus-dot--reuniao,
.pstatus-dot--banheiro,
.pstatus-dot--atendimento {
    border-radius: 0;
    background: none;
}

.pstatus-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pstatus-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pstatus-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pstatus-timer {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* Resumo de Produtividade */
.perfil-produtividade {
    margin: 0 32px 32px;
    padding: 24px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.produtividade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.produtividade-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.produtividade-title .material-icons-outlined {
    font-size: 22px;
    color: var(--color-primary);
}

.produtividade-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.produtividade-filtro {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.produtividade-date {
    padding: 6px 10px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--color-text);
    outline: none;
    cursor: pointer;
}

.produtividade-date:focus {
    border-color: var(--color-accent);
}

.produtividade-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.produtividade-row {
    display: grid;
    grid-template-columns: 200px 1fr 80px;
    align-items: center;
    gap: 16px;
}

.produtividade-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text);
}

.produtividade-pct {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.produtividade-bar-wrapper {
    height: 8px;
    border-radius: 4px;
    background: #f1f5f9;
    overflow: hidden;
}

.produtividade-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.produtividade-bar--online {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.produtividade-bar--almoco {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.produtividade-bar--lanche {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.produtividade-bar--reuniao {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.produtividade-bar--banheiro {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.produtividade-bar--atendimento {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.produtividade-time {
    text-align: right;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ================================================
   LOADING SPINNER
   ================================================ */
.btn-login.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-login.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

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

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
    .fluxo-grid {
        grid-template-columns: 1fr;
    }
    
    .conversations-panel {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 700px) {
    .sidebar {
        width: 60px;
        min-width: 60px;
    }

    .nav-label,
    .user-info,
    .brand-text,
    .status-chevron,
    .nav-arrow {
        display: none;
    }

    .nav-section-toggle,
    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .nav-item {
        padding-left: 12px;
    }

    .sidebar-user {
        justify-content: center;
    }

    .status-select {
        display: none;
    }

    .conversations-panel {
        width: 100%;
        min-width: 100%;
    }
}

/* ================================================
   TRANSITIONS & ANIMATIONS
   ================================================ */
.page-enter {
    animation: pageEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.ripple:active::after {
    opacity: 1;
}
