/* ============================================================
   Team & Roles — Simplified Responsive Styles
   File: jt-onboarding-team.css
   Version: 2.0 (For simplified onboarding layout)
   Supports: Dark mode, RTL, all devices
   ============================================================ */

:root {
  --color-bg: #ffffff;
  --color-text: #111827;
  --color-subtext: #555;
  --color-border: #ddd;
  --color-primary: #2f7cf6; /* JT Blue */
  --color-primary-hover: #1d5fd6;
  --color-muted: #6b7280;
  --color-table-bg: #f9fafb;
}

[data-theme="dark"] {
  --color-bg: #1f2937;
  --color-text: #f3f4f6;
  --color-subtext: #9ca3af;
  --color-border: #374151;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-muted: #9ca3af;
  --color-table-bg: #111827;
}

/* ============================================================
   Panel Container
   ============================================================ */
#rt-panel-team {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  background: var(--color-bg);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  color: var(--color-text);
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================================
   Header
   ============================================================ */
.rt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.rt-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
}
.rt-subtext {
  color: var(--color-subtext);
  font-size: 15px;
}

/* ============================================================
   Buttons
   ============================================================ */
.rt-btn {
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}
.rt-btn.primary {
  background: var(--color-primary);
  color: #fff;
}
.rt-btn.primary:hover {
  background: var(--color-primary-hover);
}
.rt-btn.ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
[data-theme="dark"] .rt-btn.ghost {
  border-color: var(--color-border);
  color: var(--color-text);
}
.rt-btn.small {
  font-size: 14px;
  padding: 6px 12px;
}

/* ============================================================
   Fields (inputs & selects)
   ============================================================ */
.rt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rt-field span {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.rt-field input,
.rt-field select {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 15px;
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  transition: all 0.2s ease;
}
.rt-field input:focus,
.rt-field select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(47, 124, 246, 0.15);
  outline: none;
}

/* ============================================================
   Table
   ============================================================ */
.rt-table-wrapper {
  overflow-x: auto;
  width: 100%;
}
.rt-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.rt-table th,
.rt-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 12px 14px;
  text-align: left;
}
.rt-table th {
  background: var(--color-table-bg);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
}
.rt-table td {
  font-size: 15px;
  color: var(--color-text);
}
.rt-table .actions {
  text-align: right;
}
.rt-table tr.loading-row td {
  text-align: center;
  color: var(--color-muted);
}

/* ============================================================
   Inline Add Member Form
   ============================================================ */
.rt-form {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}
.rt-title-sm {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}
.rt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================================
   RTL SUPPORT
   ============================================================ */
[dir="rtl"] #rt-panel-team {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .rt-table th,
[dir="rtl"] .rt-table td {
  text-align: right;
}
[dir="rtl"] .rt-actions {
  justify-content: flex-start;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Large Tablets (≤992px) */
@media (max-width: 992px) {
  #rt-panel-team {
    padding: 20px;
  }
  .rt-table th,
  .rt-table td {
    padding: 10px;
  }
}

/* Tablets (≤768px) */
@media (max-width: 768px) {
  .rt-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .rt-form .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Small Tablets & Large Phones (≤600px) */
@media (max-width: 600px) {
  .rt-form .grid {
    grid-template-columns: 1fr;
  }
  .rt-btn {
    width: 100%;
  }
  .rt-table {
    font-size: 14px;
    min-width: 500px;
  }
  .rt-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Phones (≤480px) */
@media (max-width: 480px) {
  #rt-panel-team {
    padding: 16px;
  }
  .rt-title {
    font-size: 19px;
  }
  .rt-subtext {
    font-size: 13px;
  }
  .rt-btn.small {
    font-size: 13px;
    padding: 6px 10px;
  }
  .rt-field input,
  .rt-field select {
    font-size: 14px;
  }
  .rt-table {
    min-width: 450px;
  }
}

/* Ultra Small Devices (≤360px) */
@media (max-width: 360px) {
  #rt-panel-team {
    padding: 12px;
  }
  .rt-title {
    font-size: 17px;
  }
  .rt-title-sm {
    font-size: 16px;
  }
  .rt-btn {
    font-size: 13px;
    padding: 8px 10px;
  }
  .rt-table {
    min-width: 400px;
  }
}
