html, body {
  height: 100vh;
  min-height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

body {
  background: linear-gradient(135deg, #fff 60%, #f3f3f3 100%);
  color: #222;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  padding: 2vw;
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 0 auto;
  width: 100%;
  height: 100%;
}

.glow {
  font-size: 3vw;
  max-width: 90vw;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: #ff9900;
  word-break: break-word;
}

@keyframes flicker {
  0% { opacity: 1; text-shadow: 0 0 10px #ff9900, 0 0 20px #ff9900, 0 0 40px #ff9900, 0 0 80px #ff9900; }
  50% { opacity: 0.85; text-shadow: 0 0 5px #ff9900, 0 0 10px #ff9900, 0 0 20px #ff9900, 0 0 40px #ff9900; }
  100% { opacity: 1; text-shadow: 0 0 10px #ff9900, 0 0 20px #ff9900, 0 0 40px #ff9900, 0 0 80px #ff9900; }
}

.subtitle {
  margin-top: 1.5rem;
  font-size: 5vw;
  max-width: 90vw;
  color: #444;
  letter-spacing: 0.05em;
  opacity: 0.8;
  animation: fadeIn 2s 1s both;
  text-align: center;
  word-break: break-word;
}

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

.animated-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(120deg, rgba(255,153,0,0.07) 0 2px, transparent 2px 40px);
  animation: moveBg 10s linear infinite;
}

@keyframes moveBg {
  0% { background-position: 0 0; }
  100% { background-position: 200px 200px; }
}

.reg-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.7);
  padding: 2rem 2.5rem;
  border-radius: 1.2rem;
  box-shadow: 0 0 24px 2px #ff990033;
  min-width: 369px;
  margin-top: 15px;
}

.reg-form label {
  margin-bottom: 1.2rem;
}

.reg-form input[type="text"] {
  background: #fff;
  color: #222;
  border: 2px solid #ff9900;
  border-radius: 0.7rem;
  padding: 0.8rem 1.2rem;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 10px #ff990055;
}

.reg-form input[type="text"]:focus {
  border-color: #ff9900;
  box-shadow: 0 0 16px 2px #ff9900;
}

.reg-form button {
  background: #ff9900;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px #ff990055;
  transition: background 0.2s, color 0.2s;
}

.reg-form button:hover {
  background: #fff;
  color: #ff9900;
}

.main-logo {
  display: block;
  margin: 0 auto 1.5rem auto;
  max-width: 160px;
  width: 40vw;
  height: auto;
  filter: drop-shadow(0 0 24px #ff9900cc) brightness(1.1);
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1.2rem;
  box-sizing: border-box;
}

.main-header {
  width: 100vw;
  background: #fff;
  padding: 0.7rem 0 0.7rem 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  box-shadow: 0 2px 16px #ff990033, 0 1px 0 #eee;
  border-bottom: 1px solid #ff9900;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 4.5rem;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.header-logo {
  height: 4.2rem;
  width: auto;
  padding: 0.2rem 0.7rem;
  border-radius: 0.7rem;
  transition: transform 0.18s, box-shadow 0.18s;
  background-color: #ff9900;
}

.header-logo:hover {
  transform: scale(1.06) rotate(-2deg);
  filter: drop-shadow(0 0 24px #ff9900cc);
}

.site-title {
  color: #ff9900;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 0.08em;
}

.index-h1 {
  color: #ff9900;
  font-size: 2.2rem;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.08em;
}

.app-h1 {
  color: #ff9900;
  font-size: 2.2rem;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.08em;
  margin-bottom: -40px;
}

.main-footer {
  width: 100vw;
  background: rgba(255,255,255,0.85);
  padding: 1rem 0 1rem 0;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 10;
  text-align: center;
  color: #444;
  font-size: 1rem;
  letter-spacing: 0.04em;
  box-shadow: 0 -2px 16px #ff990033;
}

.site-explanation {
  color: #222;
  border-radius: 0.7rem;
  max-width: 500px;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 0.01em;
  margin-top: 5px;
}

.car-info {
  max-height: 60vh;
  overflow-y: auto;
  background: rgba(255,255,255,0.8);
  border-radius: 1.2rem;
  box-shadow: 0 0 24px 2px #ff990033;
  padding: 1.5rem;
  margin: 1rem 0;
  max-width: 600px;
  color: #222;
  padding-top: 0.5rem;

  h2 {
    margin: 0.5em 0;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 600px) 1fr;
  grid-template-rows: 1fr 2fr;
  grid-template-areas:
    "left chat"
    "left chat";
  gap: 1.2rem;
  width: 100%;
  height: calc(100vh - 7.5rem);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.dashboard-left {
  grid-area: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.dashboard-title {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  text-align: left;
  font-size: 1.3rem;
  box-shadow: none;
  color: #ff9900;
  display: flex;
  align-items: center;
  gap: 0.7em;
}

.dashboard-car-info {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding-bottom: 0;
  margin-top: 0;
  min-height: 180px;
  margin-top: 2.5rem;
}

.dashboard-mot-history {
  flex: 1 1 auto;
  overflow-y: auto;
  margin-top: 0.5rem;
  min-height: 120px;
}

.dashboard-chat {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  height: 100%;
  min-width: 0;
}

.dashboard-chat .chat-container {
  height: 100%;
  min-height: 320px;
  max-width: 85rem;
  margin: 0;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "left"
      "chat";
    height: auto;
    gap: 1.2rem;
  }
  .dashboard-left {
    max-width: 100vw;
  }
  .dashboard-chat .chat-container {
    max-width: 100vw;
    margin: 0;
  }
}

@media (max-width: 700px) {
  .glow {
    font-size: 10vw;
  }
  .subtitle {
    font-size: 6vw;
  }
  body {
    padding: 4vw;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.7rem;
    padding: 0;
  }
  .dashboard-left {
    max-width: 100vw;
    padding: 0;
  }
  .dashboard-title {
    font-size: 1.1rem;
  }
}

/* Mobile nav bar styles */
.mobile-nav {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0;
  width: 100vw;
  background: #fff;
  z-index: 11;
  box-shadow: 0 2px 16px #ff990033, 0 1px 0 #eee;
  border-bottom: 1px solid #ff9900;
  justify-content: space-around;
  align-items: center;
  padding: 0.2em 0;
  gap: 0;
}
.mobile-tab {
  flex: 1 1 0;
  background: none;
  border: none;
  outline: none;
  color: #ff9900;
  font-size: 1.1em;
  font-weight: bold;
  padding: 1em 0.5em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: background 0.18s, color 0.18s, border 0.18s;
}
.mobile-tab.active {
  background: #ff9900;
  color: #fff;
  border-bottom: 2px solid #ff9900;
}
.mobile-breaks {
  display:none;
}
@media (max-width: 1100px) {
  .mobile-breaks {
    display:block;
  }

  .mobile-nav {
    display: flex;
  }

  #mot-history {
    h2 {
      display: none;
    }
  }

  .chat-example {
    margin-bottom: 0.5em!important;
  }

  .mobile-tab-content {
    max-width: 100vw;
    margin-left: -4vw;
    margin-right: -4vw;
    border-radius: 0;
    box-shadow: none;
    height: 58vh;
  }

  .main-footer {
    height: 30px;
  }

  .copyright-alt {
    display: block!important;
  }

  .copyright {
    display: none!important;
  }

  .main-header {
    height: 2.5rem;

    img {
      height: 3rem;
    }

    a {
      left: 0;
      top: 1rem;
      background: none;
      padding: 0;
      margin-left: 10px;
      z-index: -1;
    }
  }
}

.copyright-alt {
  display: none;
  margin-right: 2em;
}

.chat-container {
  background: rgba(255,255,255,0.95);
  border-radius: 1rem;
  box-shadow: 0 0 12px 1px #ff990033;
  padding: 1rem 1.2rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: 100%;
  height: 32vh;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: scroll;
  margin-bottom: 1rem;
  color: #222;
  font-size: 1.05rem;
}

.chat-message {
  margin-bottom: 0.7rem;
  padding: 0.5rem 0.8rem;
  border-radius: 1.2em;
  background: #f3f3f3;
  color: #222;
  box-shadow: 0 0 6px #ff990022;
  word-break: break-word;
  max-width: 75%;
  position: relative;
  display: inline-block;
  clear: both;
}

.chat-message.user {
  background: #fffae6;
  color: #222;
  align-self: flex-end;
  float: right;
  border-bottom-right-radius: 0.2em;
}

.chat-message.bot {
  background: #ff9900;
  color: #fff;
  align-self: flex-start;
  float: left;
  border-bottom-left-radius: 0.2em;
}

.chat-form {
  display: flex;
  gap: 0.7rem;
}

.chat-form input[type="text"] {
  flex: 1 1 auto;
  background: #fff;
  color: #222;
  border: 2px solid #ff9900;
  border-radius: 0.7rem;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-form input[type="text"]:focus {
  border-color: #ff9900;
  box-shadow: 0 0 8px 1px #ff9900;
}

.chat-form button {
  background: #ff9900;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 6px #ff990055;
  transition: background 0.2s, color 0.2s;
}

.chat-form button:hover {
  background: #fff;
  color: #ff9900;
}

.months-left {
  padding: 0.1em 0.5em;
  border-radius: 0.7em;
  font-size: 0.98em;
  font-weight: bold;
  float: right;
  color: #fff;
  background: #137a13;
  width: 60px;
  text-align: center;
}

.months-left.mot-result {
  margin: 0;
}

.months-left.low {
  background: #a31515;
}

.back-btn {
  position: absolute;
  left: 1.2rem;
  top: 1rem;
  background: rgba(255,255,255,0.8);
  color: #ff9900;
  padding: 0.5em 1.2em;
  border-radius: 0.7em;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
  z-index: 20;
  font-size: 25px;
}

.back-btn:hover {
  background: #eee;
  color: #ff9900;
}

.mot-separator {
  border: 0; 
  border-top: 1px solid #ff9900; 
  margin: 16px 0;
}

.man-logo {
  width: auto;
  height: 50px;
}

.chat-examples {
  height: 50px;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5em;
  margin-bottom: 0.7em;
  margin-top: 0.2em;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #ff9900 #fff;
}

.chat-examples::-webkit-scrollbar {
  height: 8px;
}

.chat-examples::-webkit-scrollbar-thumb {
  background: #ff9900;
  border-radius: 4px;
}

.chat-examples::-webkit-scrollbar-track {
  background: #fff;
  border-radius: 4px;
}

.chat-example {
  background: #fff;
  color: #ff9900;
  border: 1px solid #ff9900;
  border-radius: 1em;
  padding: 0.35em 1em;
  font-size: 0.98em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s;
  margin-bottom: 1em;
  margin-right: 0.2em;
  user-select: none;
  box-shadow: 0 0 6px #ff990022;
  white-space: nowrap;
}

.defect-alert {
  display: flex;
  align-items: center;
  border-radius: 0.7em;
  padding: 0.5em 1em;
  margin: 0.7em 0 0.7em 0;
  font-weight: bold;
  font-size: 1.08em;
  box-shadow: 0 0 10px 2px #ff990033;
}

.defect-alert-major {
  background: #a31515;
  color: #fff;
}

.defect-alert-advisory {
  background: #ff9900;
  color: #fff;
}

.defect-icon {
  font-size: 1.5em;
  margin-right: 0.5em;
  filter: drop-shadow(0 0 4px #000a);
}

.defect-text {
  flex: 1 1 auto;
}

#loading-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(255,255,255,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-modal-content {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 0 24px 2px #ff990033;
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.loading-spinner {
  border: 6px solid #eee;
  border-top: 6px solid #ff9900;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: #ff9900;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.04em;
}

.estimates-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.13em;
  font-weight: 500;
  color: #222;
  border-radius: 0.7em;
  box-shadow: 0 0 8px #ff990022;
  padding: 0.7em 1.2em;
}

.estimate-left, .estimate-right {
  color: #ff9900;
}

.main-footer {
  display: flex;
  justify-content: space-between; /* this pushes items to left and right */
  align-items: center;
  padding: 10px 20px;
}

.kofi {
  display: flex;
  align-items: center;
}

.copyright {
  margin-right: 2em;
}

.green-tick {
  color: #137a13;
  text-shadow: none;
  filter: none;
}

.no-defects {
  box-shadow: none;
  padding: 0;
}