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

:root {
  --bg: #0b120e;
  --panel: #142018;
  --panel-hover: #19271e;
  --ink: #f0f4f1;
  --muted: #8fa095;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(184, 239, 66, 0.25);
  --accent: #b8ef42;
  --accent-dark: #122010;
  --accent-glow: rgba(184, 239, 66, 0.18);
  --danger: #f87171;
  --sidebar: #0e1712;
  --sidebar-muted: #85968b;
  --shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 239, 66, 0.3) rgba(11, 18, 14, 0.5);
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(11, 18, 14, 0.6);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(184, 239, 66, 0.25);
  border-radius: 10px;
  border: 2px solid rgba(11, 18, 14, 0.6);
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 239, 66, 0.6);
  box-shadow: 0 0 10px rgba(184, 239, 66, 0.5);
}
::-webkit-scrollbar-corner {
  background: transparent;
}

html { font-size: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
progress::-webkit-progress-value {
  background: linear-gradient(90deg, #b8ef42 0%, #10b981 100%);
  border-radius: 20px;
}
progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.summary-strip div {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.summary-strip div:last-child {
  border-right: none;
}
.summary-strip span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.summary-strip strong {
  display: block;
  font: 800 1.5rem 'Manrope', sans-serif;
  color: #ffffff;
  margin-top: 6px;
}

.chips {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.chips button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s;
}
.chips button:hover {
  color: #ffffff;
}
.chips button.active {
  background: var(--accent);
  color: #122010;
}

.danger-link {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.danger-link:hover {
  background: rgba(248, 113, 113, 0.12);
}
.text-action {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  margin-top: 12px;
  border: 0;
  background: none;
}

/* Brand Header Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.brand-logo {
  max-height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(184, 239, 66, 0.25));
  transition: transform 0.2s ease;
}
.brand-logo:hover {
  transform: scale(1.03);
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.sidebar nav {
  padding: 12px 14px;
  overflow: auto;
  flex: 1;
}
.sidebar nav p {
  margin: 20px 10px 8px;
  color: #5c6c62;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sidebar nav a, .side-bottom a, .link-button {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sidebar-muted);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
}
.sidebar nav a:hover, .side-bottom a:hover, .link-button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}
.sidebar nav a.active {
  background: rgba(184, 239, 66, 0.12);
  color: #ffffff;
  font-weight: 700;
  border-color: rgba(184, 239, 66, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.sidebar nav a.active .nav-icon {
  color: var(--accent);
}
.nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  display: inline-flex;
  justify-content: center;
}
.side-bottom {
  border-top: 1px solid var(--line);
  padding: 14px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.logout-btn:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
}

/* Topbar Header */
.topbar {
  position: fixed;
  left: 240px;
  right: 0;
  top: 0;
  height: 72px;
  background: rgba(11, 18, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.icon-button:hover {
  border-color: rgba(184, 239, 66, 0.4);
  background: rgba(184, 239, 66, 0.08);
}
.avatar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 4px 14px 4px 4px;
  border-radius: 20px;
  transition: all 0.2s;
}
.avatar-chip:hover {
  border-color: rgba(184, 239, 66, 0.4);
  background: rgba(184, 239, 66, 0.08);
}
.avatar-chip .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8ef42 0%, #10b981 100%);
  color: #0b120e;
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}
.avatar-chip .avatar-name {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1.4rem;
}

/* App Main Container */
.app-main {
  margin-left: 240px;
  padding: 104px 36px 70px;
  max-width: 1600px;
  min-height: 100vh;
}

/* Headings & Actions */
.page-heading {
  margin-bottom: 28px;
}
.page-heading.with-action, .dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.page-heading h1 {
  font: 800 clamp(1.8rem, 2.5vw, 2.6rem) 'Manrope', sans-serif;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 6px 0 8px;
  color: #ffffff;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
  font-size: 0.92rem;
}
.kicker {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Buttons */
.button {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.button.primary {
  background: linear-gradient(135deg, #b8ef42 0%, #95d41f 100%);
  color: #122010;
  box-shadow: 0 6px 20px rgba(184, 239, 66, 0.25);
}
.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(184, 239, 66, 0.35);
}
.button.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #ffffff;
}
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.button.tiny { padding: 7px 12px; font-size: 0.78rem; border-radius: 8px; }
.button.wide { width: 100%; }
.button-row { display: flex; gap: 10px; }

/* Panels & Cards */
.panel, .table-panel, .card, .calculator-card, .plan-card, .record-card, .result-card, .photo-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}
.panel h2, .panel h3 {
  font: 700 1.15rem 'Manrope', sans-serif;
  margin: 4px 0;
  color: #ffffff;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.panel-head a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* Tables Estilo App */
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-head { padding: 22px 26px; margin: 0; border-bottom: 1px solid var(--line); }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; }
th {
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
}
td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(184, 239, 66, 0.03); }
td small { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 2px; }

/* Status Badges */
.status-pill, .classification {
  display: inline-flex;
  align-items: center;
  background: rgba(184, 239, 66, 0.12);
  color: var(--accent);
  border: 1px solid rgba(184, 239, 66, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
}
.status-pill.blocked, .status-pill.inactive {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.25);
}

/* Form Controls & Inputs */
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }
label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #a4b4ab;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  outline: none;
  transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(0, 0, 0, 0.5);
}
textarea { resize: vertical; }

/* Modais Dialog */
dialog {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 0;
  width: min(600px, calc(100% - 32px));
  max-height: 88vh;
  overflow: auto;
  background: var(--panel);
  color: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
dialog::backdrop {
  background: rgba(5, 10, 7, 0.85);
  backdrop-filter: blur(8px);
}
dialog form { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dialog-head h2 { margin: 0; font-family: 'Manrope'; color: #ffffff; }
.dialog-head button { font-size: 1.5rem; border: 0; background: none; color: var(--muted); }

/* Flash Messages */
.flash {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid;
  width: 100%;
}
.flash.success { background: rgba(184, 239, 66, 0.12); border-color: rgba(184, 239, 66, 0.3); color: var(--accent); }
.flash.error { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.3); color: var(--danger); }

/* Grid Systems for Internal Views */
.card-grid, .calculator-grid, .photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.calculator-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.calculator-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.calculator-card h2 { margin: 20px 0 6px; }

.photo-card { padding: 0; overflow: hidden; }
.photo-card img { width: 100%; height: 320px; object-fit: cover; display: block; }
.photo-card div { padding: 16px; display: flex; justify-content: space-between; font-size: 0.8rem; }

/* Dashboard Specific Styles */
.app-welcome-card {
  background: linear-gradient(135deg, #18261e 0%, #0d1712 100%);
  border: 1px solid rgba(184, 239, 66, 0.15);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.app-welcome-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(184, 239, 66, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.app-welcome-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.app-welcome-badge {
  background: rgba(184, 239, 66, 0.12);
  color: var(--accent);
  border: 1px solid rgba(184, 239, 66, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-welcome-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.app-welcome-date { color: #91a098; font-size: 0.75rem; font-weight: 600; }
.app-welcome-title { font: 800 clamp(1.8rem, 2.5vw, 2.4rem) 'Manrope', sans-serif; letter-spacing: -0.04em; color: #ffffff; margin: 4px 0 6px 0; line-height: 1.15; }
.app-welcome-subtext { color: #a0b2a7; font-size: 0.9rem; margin: 0; }
.app-welcome-user-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  border-radius: 16px;
}
.app-welcome-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #b8ef42 0%, #10b981 100%);
  color: #0d1712;
  font: 800 1.2rem 'Manrope', sans-serif;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 15px rgba(184, 239, 66, 0.3);
}
.app-welcome-info { display: flex; flex-direction: column; }
.app-welcome-info strong { color: #ffffff; font-size: 0.95rem; font-weight: 700; }
.app-welcome-info span { color: var(--accent); font-size: 0.75rem; font-weight: 600; }

.app-action-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.app-action-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-action-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 239, 66, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.app-action-chip.primary-chip {
  background: linear-gradient(135deg, #b8ef42 0%, #95d41f 100%);
  color: #122010;
  border: none;
  box-shadow: 0 8px 20px rgba(184, 239, 66, 0.25);
}
.app-action-chip.primary-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(184, 239, 66, 0.35);
}

.app-widgets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.app-widget-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 155px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}
.app-widget-card:hover {
  border-color: rgba(184, 239, 66, 0.3);
  transform: translateY(-3px);
}
.app-widget-card.featured-card {
  background: linear-gradient(145deg, #132219 0%, #192d21 100%);
  border: 1px solid rgba(184, 239, 66, 0.25);
  color: #ffffff;
}
.app-widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.app-widget-title { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.app-widget-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(184, 239, 66, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.app-widget-value {
  font: 800 clamp(1.8rem, 2.2vw, 2.4rem) 'Manrope', sans-serif;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.app-widget-value small { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.app-widget-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.app-widget-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.app-widget-tag.positive { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.app-widget-tag.negative { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.app-widget-tag.neutral { background: rgba(148, 163, 184, 0.12); color: var(--muted); }
.app-widget-sub { font-size: 0.73rem; color: var(--muted); }

.dashboard-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.app-card-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.app-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.app-card-head h3 { font: 700 1.15rem 'Manrope', sans-serif; margin: 2px 0 0 0; color: #ffffff; }
.app-card-link { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.app-chart-container { position: relative; height: 270px; width: 100%; }

.app-timeline-feed { display: flex; flex-direction: column; gap: 12px; }
.app-timeline-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 14px;
}
.app-timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.app-timeline-icon.weight { background: rgba(184, 239, 66, 0.12); color: var(--accent); }
.app-timeline-icon.workout { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.app-timeline-icon.cardio { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.app-timeline-content { flex: 1; }
.app-timeline-title { font-weight: 700; font-size: 0.88rem; color: #ffffff; }
.app-timeline-date { font-size: 0.73rem; color: var(--muted); }

.app-goal-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 14px;
  margin-bottom: 12px;
}
.app-goal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.app-goal-title { font-weight: 700; font-size: 0.88rem; color: #ffffff; }
.app-goal-pct { background: rgba(184, 239, 66, 0.12); color: var(--accent); font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 20px; }
.app-goal-bar { height: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: 8px; }
.app-goal-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, #b8ef42 0%, #10b981 100%); }
.app-goal-footer { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); }

.app-tip-widget {
  background: linear-gradient(135deg, rgba(184,239,66,0.08) 0%, rgba(16,185,129,0.05) 100%);
  border: 1px solid rgba(184, 239, 66, 0.2);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.app-tip-icon { font-size: 1.6rem; }
.app-tip-content h4 { margin: 0 0 4px 0; font-size: 0.9rem; font-weight: 700; color: #ffffff; }
.app-tip-content p { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }

/* Guest & Auth Layout Styling */
.guest-shell {
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(circle at 50% 15%, rgba(184, 239, 66, 0.08) 0%, transparent 65%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
}

.guest-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guest-header {
  margin-bottom: 28px;
  text-align: center;
  display: flex;
  justify-content: center;
  width: 100%;
}

.guest-logo-link {
  display: inline-block;
  padding: 8px;
  transition: transform 0.2s ease;
}

.guest-logo-link:hover {
  transform: scale(1.04);
}

.guest-logo {
  max-height: 85px;
  width: auto;
  max-width: 85vw;
  object-fit: contain;
  filter: drop-shadow(0 6px 24px rgba(184, 239, 66, 0.45));
}

.guest-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-card {
  width: 100%;
  max-width: 880px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-card.wide-card {
  max-width: 980px;
}

.auth-copy {
  background: linear-gradient(145deg, #18261e 0%, #0d1712 100%);
  border-right: 1px solid var(--line);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-copy::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(184, 239, 66, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-copy .kicker {
  color: var(--accent);
  margin-bottom: 8px;
}

.auth-copy h1 {
  font: 800 clamp(1.8rem, 2.4vw, 2.3rem) 'Manrope', sans-serif;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin: 8px 0 14px 0;
  line-height: 1.15;
}

.auth-copy p {
  color: #8fa095;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.auth-card form {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.muted-link {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s;
}

.muted-link:hover {
  color: var(--accent);
}

.form-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 16px;
  margin-bottom: 0;
}

.form-foot a {
  font-weight: 700;
  color: var(--accent);
  transition: opacity 0.2s;
}

.form-foot a:hover {
  opacity: 0.85;
}

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

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

/* Mobile Navigation Bar */
.mobile-nav {
  display: none;
  position: fixed;
  z-index: 15;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 23, 18, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: 68px;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--line);
}
.mobile-nav a {
  color: var(--sidebar-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.mobile-nav a.active {
  color: var(--accent);
}
.mobile-nav small { font-size: 0.6rem; font-weight: 700; margin-top: 4px; }

.empty { text-align: center; color: var(--muted); padding: 45px 15px; }

/* Responsividade */
@media (max-width: 1050px) {
  .app-action-bar, .app-widgets-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .calculator-grid, .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .guest-shell {
    padding: 24px 16px;
    justify-content: flex-start;
  }
  .guest-header {
    margin-bottom: 20px;
  }
  .guest-logo {
    max-height: 65px;
  }
  .auth-card {
    grid-template-columns: 1fr;
    border-radius: 20px;
    width: 100%;
  }
  .auth-copy {
    padding: 32px 24px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }
  .auth-copy h1 {
    font-size: 1.65rem;
  }
  .auth-card form {
    padding: 28px 22px;
  }
  .span-2 {
    grid-column: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: 0.25s; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .topbar { left: 0; padding: 0 18px; }
  .menu-toggle { display: block; }
  .app-main { margin-left: 0; padding: 96px 16px 92px; }
  .mobile-nav { display: flex; }
  .app-welcome-card { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
  .app-welcome-user-chip { width: 100%; }
  .app-action-bar, .app-widgets-grid, .dashboard-grid, .card-grid, .calculator-grid, .photo-grid, .form-grid { grid-template-columns: 1fr; }
  .app-card-panel { padding: 18px; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .button { display: none !important; }
  .app-main { margin: 0; padding: 20px; }
}
