@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap');

/* =============================================
   RIT CRM — Main Stylesheet
   Tema escuro, cores da RevolutionIT
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {  --radius: 10px;  --radius-lg: 16px;  --shadow: 0 4px 24px rgba(0,0,0,0.4);  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);}

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

html { font-size: 15px; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- LAYOUT ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {

  width: 240px;
  background: var(--sidebar-bg, var(--bg-surface));
  border-right: 1px solid var(--sidebar-border, var(--border));
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width 0.3s ease;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.sidebar-logo .brand span { color: var(--accent-light); }

.sidebar-logo .subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

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

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-light);
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.user-info .user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-info .user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 60px;
  background: var(--sidebar-bg, var(--bg-surface));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex: 1;
}

.page-body {
  padding: 24px;
  flex: 1;
}

/* ---- CARDS ---- */
.card {
  background: var(--sidebar-bg, var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--sidebar-bg, var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.green::before { background: var(--green); }
.stat-card.yellow::before { background: var(--yellow); }
.stat-card.blue::before { background: var(--blue); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.red::before { background: var(--red); }

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---- KANBAN ---- */
.kanban-wrapper {
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-board {
  display: flex;
  gap: 16px;
  min-width: max-content;
  align-items: flex-start;
}

.kanban-col {
  width: 280px;
  background: var(--sidebar-bg, var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.stage-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.stage-count {
  font-size: 0.7rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text-muted);
}

.kanban-col-total {
  font-size: 0.7rem;
  color: var(--text-secondary);
  padding: 4px 16px 8px;
}

.kanban-cards {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

/* ---- DEAL CARD ---- */
.deal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}

.deal-card:hover {
  border-color: var(--border);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.deal-card.inactive {
  border-color: var(--yellow);
  border-left-width: 3px;
}

.deal-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.deal-company {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.deal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.deal-value {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
}

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

.deal-date {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.deal-inactive-tag {
  font-size: 0.65rem;
  color: var(--yellow);
  margin-top: 4px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-light); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-icon { padding: 8px; border-radius: var(--radius); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  padding: 10px 12px;
  transition: border-color 0.15s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

select option { background: var(--bg-elevated); }
textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

/* ---- PROFIT DISPLAY ---- */
.profit-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profit-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profit-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green);
}

.profit-value.negative { color: var(--red); }

.profit-margin {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
}

.badge-red    { background: rgba(239,68,68,0.15);  color: #fca5a5; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-gray   { background: rgba(107,114,128,0.15); color: #9ca3af; }
.badge-green  { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.badge-blue   { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-purple { background: rgba(139,92,246,0.15); color: #c4b5fd; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

tr:hover td { background: var(--bg-elevated); }
tr:last-child td { border-bottom: none; }

.td-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

/* ---- MODAL ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--sidebar-bg, var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s;
}

.modal-backdrop.open .modal { transform: translateY(0); }

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

.modal-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 20px 24px; }

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

/* ---- TABS ---- */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
}

.tab {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  border: none;
  background: none;
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

/* ---- FUNNEL SELECTOR ---- */
.funnel-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.funnel-tab {
  padding: 7px 18px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  border: none;
  background: none;
}

.funnel-tab.active {
  background: var(--brand);
  color: #fff;
}

/* ---- LOGIN ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(107,31,58,0.12) 0%, transparent 60%);
}

.login-card {
  width: 400px;
  background: var(--sidebar-bg, var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.login-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-logo span { color: var(--accent-light); }

.login-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

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

.empty-state p { font-size: 0.85rem; }

/* ---- UTILS ---- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.82rem; }
.font-bold { font-weight: 700; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- RESPONSIVE ---- */

/* ── RANKING ── */
.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.rank-medal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #000; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #999); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #a0522d); color: #fff; }
.rank-other { background: var(--bg-elevated); color: var(--text-muted); font-size: 0.8rem; }

/* ── VELOCÍMETRO ── */
.speedometer {
  text-align: center;
  padding: 16px 0;
}
.speed-arc {
  position: relative;
  width: 160px;
  height: 80px;
  margin: 0 auto 12px;
  overflow: hidden;
}
.speed-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

/* ── FUNIL CONVERSÃO ── */
.funnel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.funnel-fill {
  height: 28px;
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 4px;
}

/* ══════════════════════════════════════

/* ── MOBILE ── */
.mobile-toggle { display:none; position:fixed; top:12px; left:12px; z-index:300; width:40px; height:40px; border-radius:10px; background:var(--bg-surface); border:1px solid var(--border); color:var(--accent); font-size:1.1rem; cursor:pointer; align-items:center; justify-content:center; box-shadow:0 4px 12px rgba(0,0,0,0.3); }

@media (max-width: 768px) {
  .mobile-toggle { display:flex; }
  .sidebar {
 position:fixed !important; left:-260px; width:250px !important; z-index:250; transition:left 300ms ease; box-shadow:4px 0 24px rgba(0,0,0,0.5); }
  .sidebar.open { left:0; }
  .main-content { margin-left:0 !important; }
  .topbar { padding-left:56px !important; }
  .page-body { padding:12px !important; }
  .modal { max-width:95vw !important; max-height:90vh !important; overflow-y:auto !important; }
  .modal-backdrop { padding:8px !important; }
  .kanban-board { overflow-x:auto; }
  .kanban-col { min-width:260px; flex-shrink:0; }
}

/* ── SIDEBAR COLOR OVERRIDE ── */
.sidebar .nav-label {
  color: var(--sidebar-text, var(--text-muted));
  opacity: 0.6;
}
.sidebar .nav-item {
  color: var(--sidebar-text, var(--text-secondary));
}
.sidebar .nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}
.sidebar .nav-item.active {
  background: rgba(255,255,255,0.12);
  color: var(--sidebar-active, var(--accent));
}
.sidebar .user-chip .user-name {
  color: #ffffff;
}
.sidebar .user-chip .user-role {
  color: var(--sidebar-text, #c8d0e8);
  opacity: 0.7;
}
.sidebar .sidebar-footer .nav-item {
  color: var(--sidebar-text, var(--text-secondary));
}

/* Light theme sidebar fix */
[data-theme='light'] .sidebar {
  box-shadow: 1px 0 8px rgba(0,0,0,0.06);
}
[data-theme='light'] .sidebar .nav-label {
  color: #8090b8;
  opacity: 1;
}
[data-theme='light'] .sidebar .nav-item {
  color: #3a4060;
}
[data-theme='light'] .sidebar .nav-item:hover {
  background: rgba(28,166,252,0.08);
  color: #1c1e3b;
}
[data-theme='light'] .sidebar .nav-item.active {
  background: rgba(28,166,252,0.12);
  color: #1ca6fc;
}
[data-theme='light'] .sidebar .user-chip .user-name {
  color: #1c1e3b;
}
[data-theme='light'] .sidebar .user-chip .user-role {
  color: #8090b8;
  opacity: 1;
}
[data-theme='light'] .sidebar .sidebar-footer .nav-item {
  color: #3a4060;
}
[data-theme='light'] .sidebar .nav-item .icon {
  color: #8090b8;
}
[data-theme='light'] .sidebar .nav-item.active .icon {
  color: #1ca6fc;
}
[data-theme='light'] .topbar {
  background: #ffffff;
  border-bottom: 1px solid #dde2f0;
}

/* Fix hover menu light */
[data-theme='light'] .sidebar .nav-item:hover {
  background: rgba(28,166,252,0.1) !important;
  color: #1c1e3b !important;
}
[data-theme='light'] .sidebar .nav-item.active {
  background: rgba(28,166,252,0.15) !important;
  color: #1ca6fc !important;
}

/* Fix logo area light */
[data-theme='light'] .sidebar > div:first-child {
  border-bottom: 1px solid #dde2f0;
}

/* Fix KPI cards no light */
[data-theme='light'] [style*='border-top:3px'] {
  background: #ffffff !important;
}

/* Mobile sidebar — fundo sólido */
@media (max-width: 768px) {
  .sidebar.open {
    background: var(--sidebar-bg, var(--bg-surface)) !important;
    backdrop-filter: none !important;
  }
  [data-theme='light'] .sidebar.open {
    background: #ffffff !important;
  }
  [data-theme='dark_blue'] .sidebar.open {
    background: #0d0f1e !important;
  }
  [data-theme='ocean'] .sidebar.open {
    background: #051525 !important;
  }
  [data-theme='dark_purple'] .sidebar.open {
    background: #0f0d1e !important;
  }
  [data-theme='midnight'] .sidebar.open {
    background: #000000 !important;
  }
  [data-theme='dark_green'] .sidebar.open {
    background: #0a0f0f !important;
  }
}

/* ══ MOBILE REFINADO — RIT CRM v4.0 ══ */
@media (max-width: 480px) {
  /* Seller - Meu Painel */
  .action-grid { grid-template-columns: 1fr !important; }
  .meta-card { padding: 14px !important; }
  .pipeline-flow { flex-direction: column !important; gap: 8px !important; }
  .pipeline-stage { min-width: 100% !important; }
  .pipeline-arrow { display: none !important; }
  .bottom-grid { grid-template-columns: 1fr !important; }
  .seller-greeting { font-size: 1.1rem !important; }
  
  /* Pipeline - Kanban */
  .kanban-board { flex-direction: column !important; overflow-x: visible !important; }
  .kanban-col { min-width: 100% !important; max-height: none !important; }
  .kanban-col-header { position: sticky; top: 0; z-index: 10; background: var(--bg-surface); }
  .deal-card { padding: 12px !important; }
  .quick-actions { display: flex !important; opacity: 1 !important; }
  
  /* Deal */
  [style*=position:sticky] { position: relative !important; }
  [style*=grid-template-columns:1fr 340px] { grid-template-columns: 1fr !important; }
  
  /* Inbox */
  .inbox-layout { grid-template-columns: 1fr !important; height: auto !important; }
  .inbox-layout.with-crm { grid-template-columns: 1fr !important; }
  .crm-panel { display: none !important; }
  .email-sidebar { max-height: 50vh; }
  
  /* General */
  .form-row { grid-template-columns: 1fr !important; }
  table { font-size: 0.78rem; }
  .btn { min-height: 44px; }
  input, select, textarea { font-size: 16px !important; /* prevent zoom on iOS */ }
  
  /* FAB */
  .fab-container { bottom: 16px !important; right: 16px !important; }
  .fab-main { width: 50px !important; height: 50px !important; }
}

@media (max-width: 768px) and (min-width: 481px) {
  .action-grid { grid-template-columns: 1fr 1fr !important; }
  .bottom-grid { grid-template-columns: 1fr !important; }
  .inbox-layout.with-crm { grid-template-columns: 1fr 1fr !important; }
}

/* FIX HOVER EMAILS - sempre legivel */
.ix-item:hover,.email-item:hover{background:rgba(28,166,252,0.06)!important}
.ix-item:hover *,.email-item:hover *{color:inherit!important}
.ix-item.active,.email-item.active{background:rgba(28,166,252,0.1)!important;border-left:3px solid #1ca6fc!important}
.ix-item.unread .ix-subj,.email-item.unread .ei-subject{font-weight:700!important;color:var(--text-100,#f0f6ff)!important}

/* CORPO EMAIL - sempre branco */
.ix-email-content,.ed-content,.email-body,.email-content{background:#fff!important;color:#1a1a1a!important;font-size:15px!important;line-height:1.8!important;font-family:-apple-system,Helvetica,Arial,sans-serif!important}
.ix-email-content a,.ed-content a{color:#1ca6fc!important}
