@import url('theme.css');

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

body {
  font-family: 'Poppins', 'Roboto', 'Open Sans', sans-serif;
  background: linear-gradient(135deg, var(--accent1) 0%, var(--accent2) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: 92pt; /* 72pt footer + 20pt padding */
}

.container {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  width: 100%;
}

.login-container {
  max-width: 450px;
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-weight: 600;
}

.form-group {
  margin: 5px 0;
}

.login-select-account {
  margin: 5px 0;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

select, input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#selectedAccount.has-value {
  background-color: #f8f8f8 !important;
  color: #777 !important;
  border: 1px solid #ddd !important;
}

.btn {
  width: 100%;
  padding: 14px;
  background: #2dc997;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 12px 0;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
  background: #2dc997;
  color: white;
  box-shadow: 0 10px 10px rgba(102, 126, 234, 0.3);
}

.btn:active {
  transform: translateY(0);
}

/* Loading animation inside button */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.links {
  text-align: start;
  margin: 2px 0 4px;
}

.links a {
  display: block;
  color: var(--accent1);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.links a:hover {
  color: var(--accent1-secondary);
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.message {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.back-btn {
  background: #6c757d;
  margin-bottom: 20px;
  padding: 10px;
  font-size: 14px;
}

.back-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

/* Password toggle wrapper */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 46px;
  flex: 1;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #aaa;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--accent1);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72pt;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  /* allow the upload button to sit at the right edge */
  padding-right: 16px;
}

.footer-content {
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
  flex: 1;
}

.footer-content p {
  margin: 0;
  opacity: 0.8;
}

.footer .credits {
  padding-top: 6pt;
  text-align: center;
  font-size: 9pt;
}

/* ── Upload trigger button ───────────────────────────────────────────────── *
 * Lives inside .footer so it inherits the dark background contrast.         *
 * Small, understated pill — visible but unobtrusive.                        *
 * ─────────────────────────────────────────────────────────────────────── */
.upload-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.upload-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.40);
}
.upload-trigger-btn svg {
  opacity: 0.80;
}

/* Animations */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.transaction-notification .alert {
  animation: slideInRight 0.3s ease-out forwards;
}

@media (max-width: 480px) {
  .container { padding: 30px 20px; }
  .form-row  { flex-direction: column; gap: 0; }
  body       { padding-bottom: 92pt; }
  .footer-content { padding: 0 10px; }
  .footer-links a { display: block; margin: 2px 0; }
  .upload-trigger-btn span { display: none; } /* icon only on very small screens */
}