/* app/assets/stylesheets/application.css */

/* Import da fonte Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variáveis globais */
:root {
  --primary-color: #FF6B00;
  --white: #FFFFFF;
  --text-color: #333333;
  --shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  --border-radius: 16px;
}

/* Reset básico + tipografia */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--primary-color) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Container do App */
.app-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: none !important;
  border-radius: 0 !important;
  background: #fff !important;
}

/* Header */
.app-header {
  background-color: var(--primary-color) !important;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: var(--white);
  font-size: 40px;
  font-weight: 600;
  margin: 0;
}

.search-icon {
  background-color: transparent;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Conteúdo principal */
.app-content {
  flex: 1;
  padding: 0 5% 20px;
  background: #fff !important;
}

.greeting {
  color: var(--white);
  font-size: 48px;
  font-weight: 600;
  margin: 20px 0 30px;
}

/* Grid de funcionalidades */
.function-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.function-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.function-card:hover {
  transform: translateY(-2px);
}

.icon-container {
  margin-bottom: 12px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.function-label {
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

/* Card de saldo */
.balance-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  font-size: 24px;
  font-weight: 500;
  color: var(--primary-color);
}

/* Tela de cadastro */
.register-screen {
  display: none;
  flex-direction: column;
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.register-screen.active {
  display: flex;
}

.register-title {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

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

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-color);
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

.submit-button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
  width: 100%;
}

.submit-button:hover {
  background-color: #E55D00;
}

/* Modal de sucesso */
.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.success-modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  max-width: 90%;
  width: 350px;
  text-align: center;
}

.modal-title {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-message {
  color: var(--text-color);
  font-size: 16px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-button:hover {
  background-color: #E55D00;
}

/* Navegação inferior */
.app-nav {
  background-color: var(--primary-color) !important;
  padding: 12px 5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #f0f0f0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
}

.nav-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 500;
}

/* Responsividade */
@media (max-width: 768px) {
  .app-container {
    justify-content: center;
    background: #fff !important;
  }

  .app-content {
    background: #fff !important;
    flex: none;
    padding: 20px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: auto;
  }

  .function-grid {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 10px;
  }

  .function-card {
    padding: 16px 8px;
    min-width: 120px;
  }

  .function-label {
    font-size: 16px;
  }

  .register-screen {
    max-width: 100%;
    padding: 20px 5%;
    margin-left: 0;
    margin-right: 0;
  }

  .register-title {
    font-size: 20px;
  }

  .form-label {
    font-size: 14px;
  }

  .form-input {
    font-size: 14px;
    padding: 10px;
  }

  .submit-button {
    font-size: 14px;
    padding: 10px 16px;
  }

  .greeting {
    font-size: 36px;
  }

  .logo {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .greeting {
    font-size: 30px;
  }

  .logo {
    font-size: 28px;
  }

  .function-label {
    font-size: 16px;
  }

  .app-header {
    padding: 15px 4%;
  }

  .app-content {
    padding: 20px 4%;
  }
}