:root {
  --primary: #0f172a;
  --accent: #3b82f6;
  --bg-body: #f1f5f9;
  --green: #10b981;
  --red: #ef4444;
}

body {
  background-color: var(--bg-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding-bottom: 100px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* TELAS */
.view-section {
  display: none;
  min-height: 100vh;
  width: 100%;
  padding-bottom: 20px;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

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

/* HEADER & CARDS */
.mobile-header {
  background: #fff;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.balance-card {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: white;
  border-radius: 24px;
  padding: 25px;
  margin: 20px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.4);
  position: relative;
  overflow: hidden;
}

.balance-val {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 10px 0 20px 0;
  letter-spacing: -1px;
}

.stat-bubble {
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  backdrop-filter: blur(5px);
}

/* LISTAS E AÇÕES */
.t-item {
  background: white;
  padding: 16px;
  border-radius: 18px;
  margin: 0 20px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid white;
  position: relative;
  transition: transform 0.1s;
  cursor: pointer;
}

.t-item:active {
  transform: scale(0.99);
}

.t-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.bg-in {
  background: #dcfce7;
  color: var(--green);
}

.bg-out {
  background: #fee2e2;
  color: var(--red);
}

.val-in {
  color: var(--green);
  font-weight: 700;
}

.val-out {
  color: var(--red);
  font-weight: 700;
}

.t-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 6px;
}

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: 0.2s;
}

.action-btn:hover,
.action-btn:active {
  background: #e2e8f0;
  color: var(--primary);
}

.action-btn.btn-clip {
  background: #eff6ff;
  color: var(--accent);
  border-color: #dbeafe;
}

.action-btn.btn-del {
  background: #fef2f2;
  color: var(--red);
  border-color: #fee2e2;
}

/* MEMBROS & PÚBLICO */
.m-item {
  background: white;
  padding: 15px;
  border-radius: 16px;
  margin: 0 20px 10px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.m-avatar {
  width: 50px;
  height: 50px;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ESTILO PÚBLICO */
.public-hero {
  background: var(--primary);
  color: white;
  padding: 40px 20px;
  border-radius: 0 0 40px 40px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
}

.dizimo-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}

.dizimo-row:last-child {
  border-bottom: none;
}

/* NAV & FAB */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 80px;
  background: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #e2e8f0;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.nav-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: 0.2s;
}

.nav-btn.active {
  color: var(--primary);
  font-weight: 800;
  transform: translateY(-3px);
}

.nav-btn i {
  font-size: 1.4rem;
}

.fab {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
  border: none;
  z-index: 990;
  transition: transform 0.2s;
}

.fab:active {
  transform: scale(0.9);
}

/* MODAIS E FORMS */
.offcanvas-bottom {
  height: 88vh !important;
  border-radius: 28px 28px 0 0;
}

.money-display {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  margin: 10px 0;
}

/* BOTÕES DE TIPO */
.type-selector {
  background: #f1f5f9;
  padding: 5px;
  border-radius: 16px;
  display: flex;
  margin-bottom: 15px;
}

.type-btn {
  flex: 1;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #64748b;
  background: transparent;
  transition: 0.3s;
}

.type-btn.active-in {
  background: white;
  color: var(--green);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.type-btn.active-out {
  background: white;
  color: var(--red);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* UPLOAD & EXTRAS */
#boxDizimista,
#boxComprovante {
  display: none;
  background-color: #f8fafc;
  border: 2px dashed #cbd5e1;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 15px;
  text-align: center;
}

#boxDizimista.visible,
#boxComprovante.visible {
  display: block;
  animation: fadeIn 0.3s;
}

.upload-label {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#previewImg {
  max-height: 160px;
  border-radius: 12px;
  margin-top: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: none;
}

/* LOGIN */
#view-login {
  background: var(--primary);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  color: white;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
}

.login-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* UTILS */
.hidden {
  display: none !important;
}

.btn-main {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
  border: none;
}