/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --primary-light: #dcfce7;
  --foreground: #171717;
  --muted: #737373;
  --border: #e5e5e5;
  --background: #ffffff;
  --card: #ffffff;
  --destructive: #ef4444;
  --yellow: #fcd34d;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
  max-width: 430px;
  margin: 0 auto;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header */
.header {
  background: var(--primary);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.logo-subtitle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-new-game {
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  color: var(--primary);
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}

.screen {
  display: block;
}

.screen.hidden {
  display: none;
}

/* Tabs Section */
.tabs-section {
  background: var(--primary);
  padding: 0 16px 16px;
}

.section-title-white {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

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

/* Games List */
.games-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-info {
  flex: 1;
}

.game-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 4px;
}

.game-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.game-referee {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--primary);
  margin-top: 4px;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.referee-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

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

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-primary.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-primary.btn-full {
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-outline.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--muted);
}

.btn-icon-outline {
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--foreground);
}

.btn-back {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--foreground);
}

.btn-back-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
}

/* Quick Actions */
.quick-actions {
  padding: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.action-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 8px;
}

.action-icon .currency {
  font-weight: 700;
  font-size: 14px;
}

.action-icon .varzea-icon {
  font-weight: 700;
  font-size: 18px;
}

.action-card span {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}

/* Feed Screen */
.feed-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 16px;
}

.feed-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #f5f5f5;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.feed-content {
  padding: 16px;
}

.btn-share-moment {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
}

.today-games {
  margin-bottom: 20px;
}

.today-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today-game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.team-badge {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

.today-game-info {
  flex: 1;
}

.today-game-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.today-game-info p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Suggestions */
.suggestions-section {
  margin-bottom: 20px;
}

.suggestions-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.suggestions-scroll::-webkit-scrollbar {
  display: none;
}

.suggestion-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}

.suggestion-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.suggestion-avatar.square {
  border-radius: 12px;
}

.suggestion-name {
  font-size: 11px;
  color: var(--foreground);
  text-align: center;
  line-height: 1.3;
}

/* Posts */
.posts-section {
  margin-bottom: 20px;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-info {
  flex: 1;
}

.post-author-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.post-author-info span {
  font-size: 12px;
  color: var(--muted);
}

.post-content {
  padding: 0 16px 12px;
  font-size: 14px;
  color: var(--foreground);
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 0 16px 12px;
  width: calc(100% - 32px);
  border-radius: 8px;
}

.post-actions {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

/* Chat Screen */
.chat-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.chat-list {
  display: flex;
  flex-direction: column;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.chat-item:hover {
  background: #f9f9f9;
}

.chat-avatar-wrapper {
  position: relative;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-avatar.square {
  border-radius: 12px;
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid white;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-info-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.chat-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.chat-time {
  font-size: 11px;
  color: var(--muted);
}

.chat-preview {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-badge {
  min-width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
  padding: 0 6px;
}

/* Conversation */
.conversation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  z-index: 200;
  display: flex;
  flex-direction: column;
  max-width: 430px;
  margin: 0 auto;
}

.conversation.hidden {
  display: none;
}

.conversation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.conversation-info {
  flex: 1;
}

.conversation-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.online-status {
  font-size: 12px;
  color: var(--primary);
}

.conversation-actions {
  display: flex;
  gap: 4px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
}

.message.received {
  background: #f3f4f6;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.sent {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message p {
  font-size: 14px;
  margin-bottom: 4px;
}

.message-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  opacity: 0.7;
  justify-content: flex-end;
}

.message-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.message-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  background: #f5f5f5;
}

.message-input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-send {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}

/* Players Screen */
.players-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.players-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.player-card .player-image {
  width: 64px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  float: left;
  margin-right: 12px;
}

.player-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}

.player-info p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.player-status {
  font-size: 12px;
  margin-top: 4px;
  display: inline-block;
}

.player-status.available {
  color: var(--primary);
}

.player-status.open {
  color: #f59e0b;
}

.player-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  clear: both;
}

.player-actions button {
  flex: 1;
}

/* Screen Header */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.screen-header .page-title {
  margin-bottom: 0;
}

/* Filters */
.filters-content {
  padding: 16px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.filter-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.filter-radio input {
  display: none;
}

.radio-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-radio input:checked + .radio-mark {
  border-color: var(--primary);
  background: var(--primary);
}

.filter-radio input:checked + .radio-mark::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.filter-stats {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.filter-stats p {
  color: var(--muted);
  font-size: 13px;
}

/* Player Detail */
.player-detail-header {
  position: relative;
}

.player-detail-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.player-detail-content {
  padding: 16px;
  margin-top: -24px;
  position: relative;
}

.player-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.player-detail-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--foreground);
}

.player-detail-stats {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.player-detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.tag-primary {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.tag-location {
  color: var(--muted);
  font-size: 13px;
}

.player-type {
  margin-top: 16px;
}

.player-type .label {
  font-size: 12px;
  color: var(--muted);
}

.player-type p {
  font-size: 14px;
  color: var(--foreground);
  margin-top: 2px;
}

.player-videos {
  margin-top: 20px;
}

.player-videos h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.videos-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

.video-thumb {
  position: relative;
  width: 128px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Referees Screen */
.referees-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.referees-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referee-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.referee-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.referee-info {
  flex: 1;
}

.referee-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.referee-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}

.referee-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--foreground);
}

.referee-role {
  font-size: 13px;
  color: var(--muted);
}

.referee-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

.referee-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.referee-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-available {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.tag-unavailable {
  background: #fee2e2;
  color: #dc2626;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.tag-muted {
  background: #f3f4f6;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
}

/* Referee Profile */
.referee-profile {
  padding: 24px 16px;
  text-align: center;
}

.referee-profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-light);
}

.referee-profile h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--foreground);
  margin-top: 16px;
}

.referee-profile-role {
  font-size: 14px;
  color: var(--muted);
}

.referee-profile-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}

.referee-profile-exp {
  font-size: 13px;
  color: var(--muted);
}

.referee-profile-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.referee-profile-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
}

.stat-item p {
  font-size: 12px;
  color: var(--muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.referee-menu {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
  text-align: left;
}

.menu-item:hover {
  border-color: var(--primary);
}

.menu-item span {
  font-size: 14px;
  color: var(--foreground);
}

.referee-action {
  padding: 16px;
}

/* Wallet Screen */
.wallet-content {
  padding: 16px;
}

.balance-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.balance-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.wallet-quick-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.wallet-action-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.wallet-action-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.wallet-action-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.transactions-section {
  margin-top: 24px;
}

.transactions-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 12px;
}

.transactions-list {
  display: flex;
  flex-direction: column;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.transaction-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-icon.deposit {
  background: var(--primary-light);
  color: var(--primary);
}

.transaction-icon.withdraw {
  background: #fee2e2;
  color: var(--destructive);
}

.transaction-desc {
  flex: 1;
  font-size: 14px;
  color: var(--foreground);
}

.transaction-amount {
  font-size: 14px;
  font-weight: 600;
}

.transaction-amount.positive {
  color: var(--primary);
}

.transaction-amount.negative {
  color: var(--destructive);
}

/* Repasses Screen */
.repasses-content {
  padding: 16px;
}

.repasse-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.repasse-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.repasse-card.completed {
  opacity: 0.6;
}

.repasse-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.repasse-info {
  flex: 1;
}

.repasse-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.repasse-info p {
  font-size: 12px;
  color: var(--muted);
}

.repasse-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--foreground);
}

/* Pagamento Screen */
.pagamento-content {
  padding: 16px;
}

.pagamento-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.pagamento-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}

.pagamento-location {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.pagamento-details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

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

.detail-row span:first-child {
  color: var(--foreground);
}

.detail-row span:last-child {
  font-weight: 600;
  color: var(--foreground);
}

.detail-row.total {
  background: #f3f4f6;
}

.detail-row.total span:first-child {
  font-weight: 700;
}

.detail-row.total span:last-child {
  color: var(--primary);
}

/* Profile Screen */
.profile-header {
  background: var(--primary);
  padding: 24px 16px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-wrapper {
  position: relative;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
}

.profile-camera-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
}

.profile-details {
  flex: 1;
}

.profile-details h2 {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.profile-details p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.profile-edit-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.profile-stat p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.profile-content {
  padding: 16px;
}

.wallet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}

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

.wallet-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.wallet-card-label {
  font-size: 12px;
  color: var(--muted);
}

.wallet-card-balance {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-menu .menu-item {
  gap: 12px;
}

.profile-menu .menu-item svg:first-child {
  color: var(--muted);
}

.profile-menu .menu-item span {
  flex: 1;
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fef2f2;
  color: var(--destructive);
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #fee2e2;
}

.member-since {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}

/* Settings Screen */
.settings-content {
  padding: 16px;
}

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

.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.settings-card.danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--foreground);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item.danger {
  color: var(--destructive);
}

.settings-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-value {
  font-size: 13px;
  color: var(--muted);
}

.connected-status {
  font-size: 13px;
  color: var(--primary);
}

.google-icon {
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #ea4335;
}

.toggle {
  width: 48px;
  height: 24px;
  background: #e5e5e5;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.active {
  background: var(--primary);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle.active .toggle-knob {
  transform: translateX(24px);
}

/* Edit Profile Screen */
.edit-profile-content {
  padding: 16px;
}

.edit-profile-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.edit-avatar-wrapper {
  position: relative;
}

.edit-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-light);
}

.edit-camera-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
}

.change-photo-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--foreground);
  background: var(--background);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-field textarea {
  resize: none;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--background);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item span {
  font-size: 10px;
  font-weight: 500;
}

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

/* Responsive adjustments */
@media (max-width: 430px) {
  .app-container {
    max-width: 100%;
  }
  
  .bottom-nav {
    max-width: 100%;
  }
  
  .conversation {
    max-width: 100%;
  }
}

/* Dynamic app */
.dynamic-section {
  margin: 24px 16px 120px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.dynamic-section.compact {
  margin: 16px;
}

.dynamic-section-header {
  margin-bottom: 12px;
}

.dynamic-subtext {
  font-size: 12px;
  color: var(--muted);
}

.admin-resumo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat {
  background: white;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.admin-stat strong {
  display: block;
  font-size: 18px;
}

.admin-stat span {
  font-size: 12px;
  color: var(--muted);
}

.accordion-stack,
.dynamic-section details {
  display: grid;
  gap: 12px;
}

.dynamic-section details {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.dynamic-section summary {
  cursor: pointer;
  font-weight: 700;
}

.dynamic-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.dynamic-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--foreground);
}

.dynamic-form input,
.dynamic-form select,
.dynamic-form textarea,
.auth-form input,
.auth-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  font: inherit;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dynamic-empty {
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.dynamic-empty.small {
  padding: 10px;
}

.dynamic-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.mini-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mini-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px;
}

.mini-card img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card strong,
.mini-card span {
  display: block;
}

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

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.auth-card {
  width: 100%;
  max-width: 390px;
  background: white;
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px;
}

.auth-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 10px;
  font-weight: 600;
}

.auth-tab.active {
  background: white;
  color: var(--primary-dark);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-divider {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.file-label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.toast-root {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 999px;
  color: white;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-info { background: #0f172a; }
.toast-success { background: #15803d; }
.toast-error { background: #b91c1c; }

.fallback-avatar,
.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.dynamic-subtext {
  margin-top: 6px;
}

@media (max-width: 420px) {
  .grid-2,
  .admin-resumo {
    grid-template-columns: 1fr;
  }
}
