/* Finieris Corporate Design System */
:root {
  /* Primary Colors */
  --primary-green: #67815c;
  --primary-orange: #f26a21;
  --primary-black: #1d1d1a;

  /* Secondary Colors */
  --light-green: #90ca6d;
  --light-blue: #d8e6f4;
  --light-grey: #83796e;

  /* Neutral Colors */
  --white: #ffffff;
  --bg-light: #fafafa;
  --border-light: #e5e5e5;
  --text-grey: #6b7280;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--primary-black);
  background-color: var(--white);
  font-size: 16px;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}


h1 {
  text-align: center;
  color: var(--primary-green);
  margin-bottom: 3rem;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h2 {
  color: var(--primary-black);
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
}

h3 {
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.section {
  margin-bottom: 2rem;
}

.info-notice {
  background-color: var(--light-blue);
  border: 1px solid var(--primary-green);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  color: var(--primary-black);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: justify;
}

.info-notice a {
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 500;
}

.info-notice a:hover {
  text-decoration: underline;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-black);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

input,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: var(--white);
  color: var(--primary-black);
  height: 3.2rem;
  min-height: 3.2rem;
  box-sizing: border-box;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23676158' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(103, 129, 92, 0.1);
}

.phone-input-group {
  display: flex;
  gap: 0.5rem;
}

.country-select {
  width: auto;
  min-width: 120px;
  flex-shrink: 0;
}

.phone-input-group input {
  flex: 1;
}

.btn {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0.025em;
  margin: 0.5rem 0;
}

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

.btn.primary:hover {
  background-color: #e05d1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 106, 33, 0.3);
}

.btn.secondary {
  background-color: var(--primary-green);
  color: var(--white);
}

.btn.secondary:hover {
  background-color: #5a7350;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(103, 129, 92, 0.3);
}

.btn.danger {
  background-color: #dc2626;
  color: var(--white);
}

.btn.danger:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.button-group .btn {
  flex: 1;
  width: auto;
}

.hidden {
  display: none;
}

.token-info {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
}

.message-area {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  max-width: 400px;
}

.message {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
  border: 1px solid transparent;
}

.message.success {
  background-color: var(--light-green);
  color: var(--primary-black);
  border-color: var(--primary-green);
}

.message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: #dc2626;
}

.message.info {
  background-color: var(--light-blue);
  color: var(--primary-black);
  border-color: var(--primary-green);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Login Page Styles */
.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.login-logo {
  max-width: 200px;
  height: auto;
}

.login-title {
  display: none; /* Hidden when logo is present */
}

.login-label {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-green);
  margin: 0;
}

.brand-mark {
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-green) 0%,
    var(--primary-orange) 100%
  );
  margin: 0.5rem 0 1rem 0;
  border-radius: 2px;
}

/* Main Page Styles */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
  padding: 2rem;
}

.company-logo {
  max-width: 300px;
  height: auto;
  margin: 0 0 1rem 0;
}

.company-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary-green);
  letter-spacing: -0.025em;
  display: none; /* Hidden when logo is present */
}

.subtitle {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--text-grey);
  font-weight: 400;
}

.greeting {
  font-size: 1.5rem;
  margin: 2rem 0;
  color: var(--primary-black);
  font-weight: 500;
  text-align: center;
}

.countdown {
  font-size: 1rem;
  margin: 1rem 0;
  color: var(--text-grey);
  font-weight: 400;
  text-align: center;
}

.countdown #timer {
  font-weight: 600;
  color: var(--primary-orange);
}

.cookie-info {
  text-align: center;
  margin: 2rem 0;
}

.user-actions {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  background: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 2px solid var(--border-light);
  color: var(--primary-black);
  font-weight: 500;
  font-size: 0.875rem;
}

.logout-btn {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0.025em;
  margin: 1.5rem 0 0.5rem 0;
  background-color: var(--primary-orange);
  color: var(--white);
}

.logout-btn:hover {
  background: #e05d1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 106, 33, 0.3);
}

.main-container .brand-mark {
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-green) 0%,
    var(--primary-orange) 100%
  );
  margin: 1rem auto;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .container {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }

  h1 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .button-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .message-area {
    position: static;
    max-width: none;
    margin-top: 1.5rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
  }

  /* Login page mobile styles */
  .login-header {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    margin-bottom: 0.75rem;
  }

  .login-logo {
    max-width: 180px;
  }

  .login-label {
    font-size: 1.25rem;
  }

  /* Main page mobile styles */
  .company-logo {
    max-width: 250px;
  }

  .company-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .greeting {
    font-size: 1.25rem;
  }

  .user-actions {
    position: static;
    margin-top: 3rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .main-container {
    padding: 1rem;
  }
}
