/**
 * 公司系統：使用者儀表板擴充樣式（綁定公司 / 公司資訊）
 * ========================================================================
 * 說明：
 * - 此檔案僅在 user dashboard 頁面且 company 系統啟用時載入
 * - 使用 Material Design 3 tokens（variables.css / uiservice.css）
 * ========================================================================
 */

/* ==========================================
 * 公司資訊（綁定時顯示）
 * ========================================== */
.profile-card .profile-company-info {
  color: var(--md-sys-color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0.5rem 0 1rem;
  padding: 6px 14px;
  background: var(--md-sys-color-primary-container);
  border-radius: 100px;
  display: inline-block;
}

/* ==========================================
 * 綁定公司按鈕（未綁定時顯示）
 * ========================================== */
.profile-card .bind-company-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 12px 24px;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-card .bind-company-btn:hover {
  background: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
  transform: translateY(-2px);
}

/* ==========================================
 * 綁定 Popup (Material 3)
 * ========================================== */
.jexhrai-bind-overlay {
  position: fixed;
  inset: 0;
  background: var(--md-sys-color-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--jexhrai-z-modal);
  backdrop-filter: blur(4px);
  animation: jexhraiBindFadeIn 0.2s ease;
}

@keyframes jexhraiBindFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.jexhrai-bind-modal {
  background: var(--md-sys-color-surface);
  border-radius: var(--md-sys-shape-corner-extra-large);
  box-shadow: var(--md-sys-elevation-4);
  width: 90%;
  max-width: 400px;
  animation: jexhraiBindSlideUp 0.3s ease;
  overflow: hidden;
}

@keyframes jexhraiBindSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bind-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.bind-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.bind-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.bind-modal-close:hover {
  color: var(--md-sys-color-error);
}

.bind-modal-body {
  padding: 24px;
}

.bind-modal-desc {
  margin: 0 0 20px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
}

.bind-form-group {
  margin-bottom: 16px;
}

.bind-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.bind-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-variant);
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface);
  transition: all 0.2s;
  box-sizing: border-box;
}

.bind-input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary), transparent 80%);
}

.bind-input::placeholder {
  color: var(--md-sys-color-outline);
}

.bind-error-msg {
  color: var(--md-sys-color-error);
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 20px;
}

.bind-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface-container-low);
}

.bind-btn-cancel {
  padding: 10px 20px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.bind-btn-cancel:hover {
  background: var(--md-sys-color-surface-variant);
}

.bind-btn-submit {
  padding: 10px 24px;
  border: none;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.bind-btn-submit:hover:not(:disabled) {
  background: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
}

.bind-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================
 * Body Lock（彈窗開啟時避免背景滾動）
 * ========================================== */
body.modal-open {
  overflow: hidden;
}


