/* Global Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  /* Pastel grey base */
  background-color: #f3f4f6 !important;
  color: #000;
  padding: 10px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Remove or comment out the checkered pattern lines below */
  /* background-image: ... */
  /* background-size: ... */
  /* background-position: ... */
}

/* Sticky Header Bar */
.header {
  position: sticky;
  top: 0;
  background-color: transparent;
  color: rgb(7, 7, 7);
  padding: 10px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  border-bottom: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 10px;
  background-color: #e0e0e0;
  padding: 5px;
  border-bottom: 1px solid #ccc;
}

.tab-button {
  padding: 10px 20px;
  background: #81d7ec;
  color: #000;
  text-decoration: none;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.tab-button:hover {
  background: #5bb8d1;
}

.tab-button.active {
  background: #fff;
  color: #000;
  border-bottom: 1px solid #fff;
}

/* Main Content Area */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex: 1;
}

/* Client Container */
.client-container {
  width: 65%;
  background-color: #f5f5f5;
  padding: 20px;
  display: flex;
  gap: 20px;
  margin: 10px 0;
}

.left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 300px;
  padding: 8px;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  font-size: 14px;
}

.work-request,
.special-request {
  display: flex;
  flex-direction: column;
}

.work-request label,
.special-request label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

.work-request textarea,
.special-request textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  font-size: 14px;
  resize: vertical;
}

/* Containers (Small, Medium, Large) */
.container-small {
  width: 100%;
  max-width: 400px;
  background: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  margin: 10px auto;
}

.container-medium {
  width: 100%;
  max-width: 800px;
  background: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  margin: 10px auto;
}

.container-large {
  width: 100%;
  max-width: 1200px;
  background: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  margin: 10px auto;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  border-radius: 5px;
}

/* Cards (Small, Medium, Large) */
.card {
  background: #fff;
  border: 1px solid #ccc;
  padding: 15px;
  margin: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.card:active {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-small {
  width: 200px;
}

.card-medium {
  width: 350px;
}

.card-large {
  width: 500px;
}

.card-rounded {
  border-radius: 10px;
}

.card-bordered {
  border: 2px solid #81d7ec;
}

.card-lifted {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-content {
  margin-bottom: 10px;
}

.card-content label {
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.card-content input,
.card-content select {
  width: 100%;
  padding: 8px;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  font-size: 14px;
}

/* Table Styles */
table {
  width: 100%;
  border: 1px solid #ccc;
  margin: 20px 0;
}
th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ccc;
}
th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* Search Bar Styling */
.search-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  max-width: 300px;
}

.search-bar .search-icon {
  font-size: 18px;
  margin-right: 10px;
  color: #4a90e2;
}

.search-bar input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

/* Table Wrapper for Scrollable Table with Max 20 Rows */
.table-wrapper {
  max-height: 1000px;
  overflow-y: auto;
}

.table-wrapper table {
  width: 100%;
}

/* Jobcard View Styling */
#jobcard-view .client-container {
  background-color: #f5f5f5;
}

#assigned-jobcards-table-body tr:hover {
  background-color: #357abd;
  color: white;
  cursor: pointer;
}

/* Memo Container */
.memo-container {
  flex: 1 0 80%;
  background: #ffffff;
  border: 1px solid #d3d3d3;
  padding: 20px;
}

.memo-container h3 {
  font-size: 18px;
  margin-bottom: 15px;
}

.textarea-wrapper {
  position: relative;
}

.memo-container textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  font-size: 14px;
  resize: vertical;
}

.memo-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
  color: #333;
  text-decoration: underline;
  pointer-events: none;
}

/* Buttons */
.button {
  padding: 10px 20px;
  margin: 5px;
  border: 1px solid #ccc;
  background: #4a90e2;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  transition: background 0.3s, transform 0.2s;
}

/* Center text in the Open button */
#open {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Light grey background for jobcard view form */
#jobcard-view .client-container {
  background-color: #f5f5f5;
}

/* Table row hover effect matching button hover */
#assigned-jobcards-table-body tr:hover {
  background-color: #357abd;
  color: white;
  cursor: pointer;
}

.button:hover {
  background: #357abd;
  transform: scale(1.05);
}

.button.active {
  background: #d0e4f5;
  color: #333;
}

/* Footer */
.footer {
  background-color: transparent;
  padding: 10px;
  border-top: none;
  text-align: center;
  margin-top: auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer .button {
  display: inline-block;
  background: #4a90e2;
  color: white;
}

.footer .button:hover {
  background: #357abd;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 15px;
  }

  .container-small,
  .container-medium,
  .container-large {
    max-width: 100%;
  }

  .card-small,
  .card-medium,
  .card-large {
    width: 100%;
  }

  .tabs {
    flex-direction: column;
    align-items: center;
  }

  .tab-button {
    width: 100%;
    text-align: center;
  }

  .client-container {
    flex-direction: column;
  }

  .left-section,
  .right-section {
    width: 100%;
  }

  .form-group input,
  .form-group select {
    max-width: 100%;
  }

  .footer .button {
    display: block;
    width: 100%;
    margin: 5px 0;
  }
}

@media (max-width: 480px) {
  .header {
    font-size: 16px;
  }

  .logo {
    font-size: 20px;
  }

  .tab-button {
    font-size: 14px;
    padding: 8px;
  }

  .button {
    font-size: 14px;
    padding: 8px;
  }
}

/* Page Title */
.page-title {
  color: #333;
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.page-title::after {
  content: "Empower Your Workflow with Precision and Ease";
  display: block;
  font-size: 16px;
  color: #666;
}

/* Form Container */
.form-container {
  display: block !important;
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form {
  display: block !important;
  background-color: #fff;
  border-radius: 5px;
  padding: 20px;
  width: 300px;
}

.form h2 {
  margin-top: 0;
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Button Styles */
.btn, .button {
  width: 100%;
  padding: 10px;
  background-color: #bfdbfe;   /* Light blue */
  color: #222;                 /* Black text */
  border: 1px solid #60a5fa;   /* Blue border */
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}

.btn:hover, .button:hover {
  background-color: #60a5fa;   /* Slightly darker blue on hover */
  color: #000;                 /* Keep text black */
}

/* Link Styles */
.link {
  display: block;
  margin-top: 10px;
  color: #007bff;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* Hidden Class */
.hidden {
  display: none;
}

.error-container {
  color: white;
  background: #e53e3e;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  max-width: 100%;
}

/* Jobcard Table Specific Styles */
#jobcardTable tr.tr-status-assigned {
  background-color: #d3d3d3 !important; /* Light grey */
}

#jobcardTable tr.tr-status-in-progress {
  background-color: #ffcccc !important; /* Light red */
}

#jobcardTable tr.tr-status-completed {
  background-color: #ccffcc !important; /* Light green */
}

#jobcardTable tr.tr-highlight {
  background-color: #bd2424 !important; /* Highlight color */
}