/* The account creating css */
.register-section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f0f4f8;
}

.register-box {
  background-color: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.register-box h2 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: bold;
}

.input-field {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.btn {
  background-color: #2563eb;
  /* a nice blue */
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #1e40af;
}

/* Chat container */
.chat-container {
  width: 100%;
  max-width: 600px;
  margin: 30px auto;
  background: #f5f7fa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

/* EXPLANATION: Messages scrollable area */
.messages-box {
  flex: 1;
  /* Takes all available space */
  overflow-y: auto;
  /* Enables scrolling */
  padding: 10px;
  margin-bottom: 10px;
  background: #ffffff;
  border-radius: 8px;
}

/* EXPLANATION: Custom scrollbar for modern look */
.messages-box::-webkit-scrollbar {
  width: 6px;
}

.messages-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.messages-box::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 10px;
}

.messages-box::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

/* EXPLANATION: USER message (right side, blue bubble) */
.message.user {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  margin-left: auto;
  /* Pushes to right */
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  /* Round except bottom-right */
  max-width: 75%;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
  word-wrap: break-word;
  /* Breaks long words */
  animation: slideInRight 0.3s ease;
}

/* EXPLANATION: ADMIN/BOT message (left side, white bubble) */
.message.bot {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  margin-right: auto;
  /* Pushes to left */
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  /* Round except bottom-left */
  max-width: 75%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  animation: slideInLeft 0.3s ease;
}

/* EXPLANATION: Timestamp styling */
.time {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  text-align: right;
  color: rgba(255, 255, 255, 0.8);
  /* For user messages */
  font-weight: 300;
}

.message.bot .time {
  color: #9ca3af;
  /* Darker for bot messages */
}

/* EXPLANATION: Input area at bottom */
.chat-input {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: 2px solid #e5e7eb;
  outline: none;
  font-size: 15px;
  transition: border-color 0.3s ease;
}

/* EXPLANATION: Input focus effect */
.chat-input input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-input button {
  padding: 12px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.chat-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.chat-input button:active {
  transform: translateY(0);
}

/* EXPLANATION: Smooth message animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== MOBILE RESPONSIVE DESIGN ==================== */
/* EXPLANATION: Optimized for phones (max-width: 768px) */
@media (max-width: 768px) {
  .chat-container {
    margin: 0;
    /* Remove side margins */
    border-radius: 0;
    /* Full width on mobile */
    height: calc(100vh - 60px);
    /* Full height minus header */
    max-width: 100%;
    padding: 10px;
  }

  .messages-box {
    padding: 8px;
    margin-bottom: 8px;
  }

  /* EXPLANATION: Larger bubbles on mobile for easier reading */
  .message.user,
  .message.bot {
    max-width: 85%;
    /* Wider bubbles */
    padding: 10px 14px;
    font-size: 15px;
    /* Slightly larger text */
    line-height: 1.4;
  }

  /* EXPLANATION: Optimize input for mobile keyboards */
  .chat-input {
    padding: 8px;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: #ffffff;
  }

  .chat-input input {
    padding: 10px 14px;
    font-size: 16px;
    /* Prevents zoom on iOS */
    border-radius: 20px;
  }

  .chat-input button {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 20px;
    white-space: nowrap;
    /* Keeps "Send" on one line */
  }

  /* EXPLANATION: Smaller timestamps on mobile */
  .time {
    font-size: 9px;
    margin-top: 4px;
  }

  /* EXPLANATION: Hide scrollbar on mobile for cleaner look */
  .messages-box::-webkit-scrollbar {
    width: 3px;
  }
}

/* EXPLANATION: Extra small devices (phones < 480px) */
@media (max-width: 480px) {
  .chat-container {
    padding: 5px;
    height: calc(100vh - 50px);
  }

  .messages-box {
    padding: 5px;
  }

  .message.user,
  .message.bot {
    max-width: 90%;
    /* Even wider for tiny screens */
    padding: 8px 12px;
    font-size: 14px;
  }

  .chat-input {
    padding: 6px;
    flex-wrap: nowrap;
    /* Keeps button next to input */
  }

  .chat-input input {
    padding: 8px 12px;
    font-size: 16px;
    min-width: 0;
    /* Allows input to shrink */
  }

  .chat-input button {
    padding: 8px 16px;
    font-size: 13px;
    flex-shrink: 0;
    /* Prevents button from shrinking */
  }
}

/* EXPLANATION: Landscape mode on phones */
@media (max-width: 768px) and (orientation: landscape) {
  .chat-container {
    height: calc(100vh - 40px);
  }

  .messages-box {
    max-height: calc(100vh - 140px);
  }
}



table {
  border: 2px solid black;
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 20px 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;

}

tr,
th,
td {
  border: 1.5px solid rgb(241, 222, 222);
  padding: 12px;
  text-align: left;
  font-size: 20px;
  font-weight: bold;
  white-space: nowrap;
}

h1 {
  text-align: center;
}

/* Client Password Confirmation Style */
.password-setup-container {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
}

.setup-card {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.setup-header {
  text-align: center;
  margin-bottom: 30px;
}

.setup-header h1 {
  color: #1f2937;
  margin: 0 0 10px 0;
}

.setup-header p {
  color: #6b7280;
  margin: 0;
}

.timer-box {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 30px;
  border-left: 4px solid #2563eb;
}

.timer-box.warning {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-left-color: #ef4444;
}

.timer-box p {
  margin: 0;
  color: #1e40af;
  font-size: 16px;
}

.timer-box.warning p {
  color: #991b1b;
}

.timer-box strong {
  font-size: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1f2937;
}

.input-field {
  width: 100%;
  padding: 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s;
}

.input-field:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
  color: #6b7280;
  font-size: 13px;
  margin-top: 5px;
  display: block;
}

.password-strength {
  margin: 15px 0;
}

.strength-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  transition: width 0.3s, background-color 0.3s;
  width: 0%;
}

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  margin-top: 10px;
}

.info-section {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
}

.info-section h3 {
  margin-top: 0;
  color: #1f2937;
}

.info-section ul {
  margin: 10px 0 0 20px;
  color: #4b5563;
}

.info-section li {
  margin: 8px 0;
}

.login-credentials {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: center;
  border-left: 4px solid #22c55e;
}

.login-credentials p {
  margin: 0;
  color: #166534;
  font-size: 15px;
}

@media (max-width: 768px) {
  .password-setup-container {
    padding: 10px;
  }

  .setup-card {
    padding: 25px;
  }
}

/* End Of Client Password Confirmation Style */