body {
  font-family: "Inter", sans-serif;
  background-color: #2e4560;
  color: #e9e9e9;
  margin: 0;
  padding: 0;
  display: block;
  min-height: 100vh;
}

#app {
  width: 100%;
}

.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.auth-card {
  background: #2e4560;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.navbar {
  background: #354f6e;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

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

.nav-user-mobile {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex !important;
  align-items: center;
}

@media (max-width: 600px) {
  #logo-desktop {
    display: none !important;
  }
}

@media (min-width: 601px) {
  #nav-user-mobile {
    display: none !important;
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 102; /* Ensure above mobile menu */
  color: var(--text-main);
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 9px;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.hamburger span:nth-child(1) {
  top: 4px;
}

.hamburger span:nth-child(2) {
  top: 11px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

.hamburger.active span:nth-child(1) {
  top: 11px;
  transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-135deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e2e2e2;
}

.nav-user {
  color: #d7d7d7;
  font-weight: 500;
  margin-right: 0.5rem;
}

.nav-links button {
  background: none;
  border: none;
  margin-left: 1.5rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 0;
}

.nav-links button:hover {
  color: var(--text-main);
}

.btn-settings {
  border: none;
  border-radius: 0;
  padding: 0;
  background-color: transparent;
}

.btn-logout {
  color: #ef4444 !important;
}

.tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  justify-content: center;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #6b7280;
}

.tab.active {
  color: #e2e2e2;
  border-bottom: 2px solid #e2e2e2;
  margin-bottom: -2px;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #f2f2f2;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background-color: #405470;
  color: #f5f7fb;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 0.35rem;
}

.btn-landing-login {
  background-color: #296bb6;
  color: #f8fbff;
}

.btn-landing-login:hover {
  background-color: #1e52a0;
}

.btn-landing-register {
  background-color: transparent;
  color: #296bb6;
  border: 2px solid #296bb6;
}

.btn-landing-register:hover {
  background-color: rgba(41, 107, 182, 0.1);
}

.btn-login-submit {
  width: 100%;
  background-color: #296bb6;
  color: #f2f2f2;
}

.btn-login-submit:hover {
  background-color: #3e79bb;
}
.btn-back {
  border: 1px solid #296bb6;
  font-weight: 600;
  background-color: #296bb6;
  color: #f2f2f2;
  border-radius: 50px;
  width: 100px;
  height: 40px;
}
.btn-back:hover {
  background-color: #1e52a0;
  border: 1px solid #1e52a0;
}
.btn-register-submit {
  width: 100%;
  background-color: #296bb6;
  color: #f2f2f2;
}

.btn-register-submit:hover {
  background-color: #1e52a0;
}

.btn-add-machine {
  background-color: #3e79bb;
  color: #052d27;
}

.btn-add-machine:hover {
  background-color: #296bb6;
}

.btn-modal-submit {
  width: 100%;
  background-color: #296bb6;
  color: #f2f2f2;
}

.btn-modal-submit:hover {
  background-color: #3e79bb;
}

.btn-machine-edit {
  background-color: #296bb6;
  color: #f2f2f2;
}

.btn-machine-edit:hover {
  background-color: #d7d7d7;
}

.btn-danger {
  background-color: #f97171;
  color: #3a0404;
  border: 1px solid #f55a5a;
}

.card {
  background: #212d3c;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.calculator-tagline {
  font-size: 0.95rem;
  color: #bfccda;
  margin: 0.35rem 0 0;
}

.machine-picker-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 1rem;
  background-color: transparent;
  padding: 0;
  border: none;
}

.machine-picker {
  flex: 1;
  position: relative;
  background-color: #212d3c;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
  box-shadow: none;
  transition: border-color 0.2s;
}

.machine-picker:hover {
  border-color: rgba(141, 162, 251, 0.3);
  box-shadow: none;
}

.machine-picker label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #f2f2f2;
  margin-bottom: 0.2rem;
  margin-left: 0;
}

.machine-picker select {
  width: 100%;
  appearance: none;
  background-color: transparent;
  border: none;
  color: #f5f7fb;
  font-size: 0.95rem;
  font-weight: 500;
  padding-right: 1.5rem;
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-picker::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 55%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #f2f2f2;
  border-bottom: 2px solid #f2f2f2;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.machine-picker:hover::after {
  transform: translateY(-40%) rotate(45deg);
  border-color: #ffffff;
}

.btn-machine-settings {
  background-color: #212d3c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f2f2f2;
  border-radius: 8px;
  width: 50px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}

.btn-machine-settings:hover {
  background-color: #253346;
  color: #ffffff;
  border-color: rgba(143, 186, 226, 0.3);
  transform: none; /* No movement */
  box-shadow: none;
}

.btn-machine-settings svg {
  width: 20px; /* Smaller icon */
  height: 20px;
  stroke-width: 2;
}

@media (max-width: 768px) {
  .machine-picker-wrapper {
    flex-direction: row; /* Keep row on mobile for better UX */
  }

  .machine-picker select {
    font-size: 1.1rem;
  }
}

.input-hint {
  font-size: 0.8rem;
  color: #b5c0cf;
  margin-top: 0.35rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #f5f7fb;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-box {
  background: #212d3c;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #d4daeb;
  margin-top: 1.5rem;
}

.info-box strong {
  color: #ffffff;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }

  .machine-picker-wrapper {
    flex-direction: row;
    width: 100%;
    margin-bottom: 25px;
    gap: 0.5rem;
  }

  .machine-picker {
    width: auto;
    min-width: 0;
  }

  .btn-machine-settings {
    width: 50px;
    min-width: 50px;
  }

  .header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .container {
    padding: 10px;
  }

  .card {
    padding: 1rem;
  }

  .navbar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

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

  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    opacity: 0;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
    transform: translateY(-10px);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    padding: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    background-color: #354f6e;
  }

  .nav-links button,
  .nav-user {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    display: block;
    height: auto;
  }

  .nav-user {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: none;
  }

  .nav-links button:last-child {
    border-bottom: none;
  }

  .landing-content {
    padding: 1.5rem;
  }

  .landing-content h1 {
    font-size: 2rem;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-large {
    width: 100%;
    text-align: center;
  }

  .features-list {
    text-align: left;
    margin: 1.5rem 0;
  }
}

.breakdown-list div {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e5e7eb;
}

.total-price {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: #e2e2e2;
  margin: 1rem 0;
}

.machine-summary {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.machine-summary-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f2f2f2;
  margin-bottom: 0.75rem;
}

.machine-summary-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.machine-summary-details span {
  display: block;
  font-size: 0.8rem;
  color: #f2f2f2;
}

.machine-summary-details strong {
  display: block;
  font-size: 1rem;
  color: #f2f2f2;
}

.machine-summary.is-empty {
  background: #fff;
  border-style: dashed;
}

.machine-summary.is-empty strong {
  color: #f2f2f2;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background: #2e4560;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 500px;
}

.close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
}

.header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.animate-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#landing-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #2e4560;
  padding: 2rem;
}

.landing-content {
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 800px;
}

.landing-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #e2e2e2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}

.feature-item {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #e2e2e2;
}

.feature-item h3 {
  margin-top: 0;
  color: #1f2937;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-large:hover {
  transform: scale(1.05);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.machine-specs {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #2e4560;
  padding: 2rem;
  border-radius: 0.5rem;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
}

.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
