.tw-lat-wrap {
    position: relative;
}

.tw-lat-support-li a,
.tw-lat-tutorial-li a {
    padding: 2px 3px 3px 25px !important;
}

.tw_bpmwc_wrap {
  margin-right: 20px;
  position: relative;
}

.tw-lat-support-quick-links {
  margin: 25px 0;
}

.tw-lat-support-quick-links h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #1e293b;
}

.tw-lat-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 25px;
}

.tw-lat-stat-card {
  background: #fff;
  border-radius: 12px;
  display: flex;
  padding: 25px;
  transition: all 0.3s ease;
  border: 2px solid #1460ac;
}

.tw-lat-stat-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border: 2px solid #fff;
}

.tw-lat-stat-card .stat-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1460ac 0%, #1e7ecc 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
}

.tw-lat-stat-card .stat-icon .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: #fff;
}

.tw-lat-stat-card .stat-content h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #1e293b;
  font-weight: 600;
}

.tw-lat-stat-card .stat-content .stat-actions {
  margin-top: 15px;
}

.tw-lat-stat-card .stat-content .stat-actions .button {
  background: #1460ac;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  padding: 6px 18px;
  transition: all 0.3s ease;
  border: 2px solid #1460AC;
}

.tw-lat-stat-card .stat-content .stat-actions .button:hover {
  background: #E8F0FE;
  color: #1460AC;
  outline: none;
}

.tw-lat-support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: start;
  margin: 30px 0;
  width: 100%;
  box-sizing: border-box;
}

.tw-lat-support-layout--single {
  grid-template-columns: 1fr;
}

.tw-lat-page-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tw-lat-page-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.tw-lat-page-top h1,
.tw-lat-page-title-row h1 {
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.tw-lat-reconnect-btn.button,
.tw-lat-reconnect-btn.button {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 18px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  background: #1460ac !important;
  border: 2px solid #1460ac !important;
  color: #fff !important;
  transition: all 0.3s ease !important;
  line-height: 1.4 !important;
  min-height: auto !important;
  text-decoration: none !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.tw-lat-reconnect-btn.button:hover,
.tw-lat-reconnect-btn.button:focus,
.tw-lat-reconnect-btn.button:hover,
.tw-lat-reconnect-btn.button:focus {
  background: #fff !important;
  color: #1460ac !important;
  border: 2px solid #1460ac !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 96, 172, 0.2) !important;
}

/* Custom flash notices */
.tw-lat-flash {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  clear: both;
}

.tw-lat-flash p {
  margin: 0.5em 0;
  padding: 2px;
  font-size: 13px;
  line-height: 1.5;
}

.tw-lat-flash p:first-child {
  margin-top: 0;
}

.tw-lat-flash p:last-child {
  margin-bottom: 0;
}

.tw-lat-flash--success {
  border-left-color: #00a32a;
  background: #edfaef;
}

.tw-lat-flash--error {
  border-left-color: #d63638;
  background: #fcf0f1;
}

.tw-lat-flash--warning {
  border-left-color: #dba617;
  background: #fcf9e8;
}

.tw-lat-flash--info {
  border-left-color: #72aee6;
  background: #f0f6fc;
}

.tw-lat-flash--dismissible {
  position: relative;
  padding-right: 38px;
}

.tw-lat-flash-dismiss {
  position: absolute;
  top: 0;
  right: 1px;
  border: none;
  background: transparent;
  color: #787c82;
  cursor: pointer;
  padding: 8px;
  margin: 0;
  font-size: 20px;
  line-height: 1;
  width: 36px;
  height: 36px;
}

.tw-lat-flash-dismiss:hover,
.tw-lat-flash-dismiss:focus {
  color: #1d2327;
}

.tw-lat-consent-notice {
  border: 2px solid #1460ac;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0 24px;
  box-sizing: border-box;
  clear: both;
  width: 100%;
  max-width: 100%;
}

.tw-lat-support-form-section,
.tw-lat-support-history {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.tw-lat-support-history-card {
  background: #fff;
  border: 2px solid #1460ac;
  border-radius: 12px;
  padding: 22px;
  position: sticky;
  top: 46px;
  box-sizing: border-box;
  width: 100%;
  z-index: 1;
}

.tw-lat-support-history-card h2 {
  margin: 0 0 6px 0;
  font-size: 20px;
  color: #1e293b;
}

.tw-lat-support-history-subtitle {
  margin: 0 0 18px 0;
  color: #64748b;
  font-size: 13px;
}

.tw-lat-support-history-empty {
  text-align: center;
  padding: 28px 12px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 10px;
}

.tw-lat-support-history-empty .dashicons {
  font-size: 28px;
  width: 28px;
  height: 28px;
  color: #1460ac;
  margin-bottom: 8px;
}

.tw-lat-support-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.tw-lat-history-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}

.tw-lat-history-admin {
  background: #eef6ff;
  border-color: #cfe2ff;
}

.tw-lat-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}

.tw-lat-history-body {
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .tw-lat-support-layout {
    grid-template-columns: 1fr;
  }

  .tw-lat-support-history-card {
    position: static;
  }
}

.tw-lat-support-form-section h2,
.tw-lat-support-form-card > h2 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #1e293b;
}

.tw-lat-review-us {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.tw-lat-review-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin: 0;
  flex: 0 1 auto;
  max-width: 100%;
  position: static;
  z-index: 2;
}

.tw-lat-review-us p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  background-color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  margin: 3px 0;
}

.tw-lat-review-us .dashicons {
  color: #1460ac;
}

.tw-lat-review-us p a {
  color: #1460ac;
  font-weight: 500;
}

.tw-lat-support-form-card {
  background: #fff;
  border: 2px solid #1460ac;
  border-radius: 12px;
  padding: 30px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.tw-lat-support-form-card .form-table {
  margin-top: 0;
  width: 100%;
  table-layout: fixed;
}

.tw-lat-support-form-card .form-table th {
  padding: 20px 10px 20px 0;
  width: 130px;
}

.tw-lat-support-form-card .form-table td {
  padding: 15px 10px;
}

.tw-lat-support-form-card .form-table input[type="text"],
.tw-lat-support-form-card .form-table input[type="email"],
.tw-lat-support-form-card .form-table input[type="url"],
.tw-lat-support-form-card .form-table textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background-color: #fff;
  border: 2px solid #1460ac;
  border-radius: 12px;
  padding: 8px 12px;
}

.tw-lat-support-form-card .form-table .tw-lat-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  cursor: pointer;
  max-width: 100%;
}

.tw-lat-support-form-card .form-table .tw-lat-consent-label span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.tw-lat-support-form-card .form-table .tw-lat-consent-label input[type="checkbox"] {
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem !important;
  max-width: 1rem !important;
  min-height: 1rem;
  margin: 3px 0 0 0 !important;
  flex-shrink: 0;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: #1460ac;
  border: 1px solid #1460ac;
  border-radius: 3px;
  padding: 0 !important;
  background: #fff;
}

.tw-lat-consent-error {
  color: #dc2626;
}

.tw-lat-consent-error input[type="checkbox"] {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.tw-lat-support-form-card .form-table input:focus,
.tw-lat-support-form-card .form-table textarea:focus {
  border-color: #0d4a85;
  box-shadow: 0 0 0 1px #1460ac;
  outline: none;
}

.tw-lat-support-form-card .form-table textarea {
  min-height: 200px;
}

.tw-lat-support-form-card .required {
  color: #dc2626;
  font-weight: bold;
}

.tw-lat-support-form-card .tw-lat-field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.tw-lat-support-form-card .tw-lat-field-error-message {
  color: #dc2626;
  font-size: 13px;
  margin: 5px 0 0 0;
  font-weight: 500;
}

.tw-lat-support-form-card .description {
  color: #64748b;
  font-size: 13px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tw-lat-support-form-card .description .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #1460ac;
}

.tw-lat-support-form-card .submit {
  margin: 25px 0 0 0;
  padding: 0;
}

.tw-lat-support-form-card .button-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  background: #1460ac !important;
  border: 2px solid #1460ac !important;
  color: #fff !important;
  transition: all 0.3s ease !important;
  line-height: 1.4 !important;
  min-height: auto !important;
}

.tw-lat-support-form-card .button-large:hover {
  background: #fff !important;
  color: #1460ac !important;
  border: 2px solid #1460ac !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 96, 172, 0.2);
}

.tw-lat-support-form-card .button-large .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* Responsive Adjustments */
@media (min-width: 991.98px) {
  .tw-lat-page-top {
    flex-wrap: nowrap;
  }

  .tw-lat-review-us,
  .tw-lat-review-stack {
    position: static;
    top: auto;
    right: auto;
  }
}

@media screen and (max-width: 782px) {
  .tw-lat-page-top {
    flex-direction: column;
    align-items: stretch;
  }

  .tw-lat-page-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .tw-lat-review-stack,
  .tw-lat-review-us {
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
  }

  .tw-lat-review-us p {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .tw-lat-reconnect-btn.button,
  .tw-lat-reconnect-btn.button {
    width: 100%;
    justify-content: center;
  }

  .tw-lat-detail-label,
  .tw-lat-detail-value {
    display: block;
    width: 100%;
    padding: 10px;
  }

  .tw-lat-detail-label {
    padding-bottom: 0;
    font-weight: 700;
  }

  .tw-lat-support-form-card {
    padding: 20px;
  }
  
  .tw-lat-support-form-card .form-table th {
    padding: 10px 0 5px 0;
    width: 100%;
    display: block;
  }
  
  .tw-lat-support-form-card .form-table td {
    padding: 5px 0 15px 0;
    display: block;
  }
  
  .tw-lat-support-form-card .form-table input[type="text"],
  .tw-lat-support-form-card .form-table input[type="email"],
  .tw-lat-support-form-card .form-table input[type="url"],
  .tw-lat-support-form-card .form-table textarea {
    max-width: 100%;
  }
  
  .tw-lat-support-form-card .button-large {
    width: 100%;
    justify-content: center;
  }
}

